Tue Jan 28, 2020 1:15 am
Login Register Lost Password? Contact Us


Reading a UTF-16 file

Questions around writing code and queries

Thu Jan 09, 2020 5:55 pm Change Time Zone

Stewart,

OK, confirmed -- 2-byte UNICODE characters is what it looks like.

So now it's time to submit a JIRA and get the developers involved. :)

HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1508
Joined: Wed Oct 26, 2011 7:40 pm

Fri Jan 10, 2020 9:09 am Change Time Zone

Hi Bob,

I tried adding the following:

Code: Select all
input_lay :=  RECORD, [b]LOCALE('en')[/b]


This was tried with the CSV definition with defaults, and with UNICODE - both produced the same.

The layout itself contained one field as STRING, one as UTF8 and one as UNICODE - none of them were parsed as expected.

The file was sprayed with the following encoding setting:

Code: Select all
,encoding := 'utf16le'
SChatman85
 
Posts: 8
Joined: Mon Sep 02, 2019 2:13 pm

Fri Jan 10, 2020 2:04 pm Change Time Zone

Hi Stewart,

I guess I am confusing locale with encoding. I was thinking this was what you needed to do:

Code: Select all
input_lay := RECORD,LOCALE('utf16le')


If that's not correct then I agree with Richard and a JIRA issue should be opened.

Regards,

Bob
bforeman
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 991
Joined: Wed Jun 29, 2011 7:13 pm

Fri Jan 10, 2020 2:16 pm Change Time Zone

SChatman85
 
Posts: 8
Joined: Mon Sep 02, 2019 2:13 pm

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron