[Info-ingres] E_AD5015 what?
Steve
s.anderson.au at gmail.com
Tue Sep 10 06:36:08 UTC 2019
On Saturday, 7 September 2019 18:20:18 UTC+10, Martin Bowes wrote:
> Hi All,
>
>
>
> I’m processing some data which instead of an empty string has been provided with a C-like end of string marker x’00’. I’m not allowed to alter this data.
>
>
>
> So I’ve allowed for this with a view which does:
>
>
>
> CASE WHEN g.quantity_v <> 2 THEN NULL
>
> WHEN g.quantity = X'00' THEN ''
>
> ELSE g.quantity
>
> END AS quantity
>
>
>
> When I use the view to select the data I get greeted with:
>
> E_AD5015 000000B7, is not a valid byte sequence for server codepage.
>
>
>
> If I remove the X’00’ part of the statement then it runs without error, but I get the crappy data.
>
>
>
> Any Ideas?
>
>
>
> Martin Bowes
Hi Martin
I came across the following from the Ingres 11 SQL guide when looking for something else the other day. I wonder if it might apply to your situation?
"Be careful when using hex constants for strings because the hex values depend on the used character set. For example, the euro sign € has a hex value of x'A4' when using ISO8859-15, but x'80' in WINDOWS-1252. Moreover, in UTF8 the euro sign takes three bytes: x'E2', x'82', x'AC'. You would produce invalid UTF8 data when using one of the other representations above. Instead, it is better to use Unicode literals for the euro sign: u&'\20AC'."
Steve
More information about the Info-ingres
mailing list