Mon Sep 27, 2021 12:40 am
Login Register Lost Password? Contact Us


accent character handling

Comments and questions related to the Enterprise Control Language

Thu Mar 07, 2019 1:50 pm Change Time Zone

hi team ,
my sources file type is text in that character set is "ISO 8859-1"
when I open that file it shows all accent characters looks fine,
I spray that file using format "utf8" after that while reading logical file
unable to see the actual value.
Note:using the layout datatype is "utf8",
this is my sources

1,Agro Oils SRL - Buenos Aires
2,Agro Oils SRL - Buenos Aires
3,Ambiente-Recuperação de Materiais de Plásticos SA
4,欢迎

this is my ecl code
Code: Select all
Layout := RECORD
UNSIGNED4 UserId;
UNICODE NAME;
END;

Utf8File := DATASET('~sathish::file_utf8::file_utf8.txt', Layout, CSV);
// westernFile := DATASET('~sathish::file_western::file_westerneuro.txt', Layout, CSV);
WesternFile := DATASET('~sathish::file_westerneuro::file_westerneuro.txt', Layout, CSV);
AnsiFile := DATASET('~sathish::file_ansi::file_ansi.txt', Layout, CSV);

OUTPUT(Utf8File,,NAMED('Utf8File'));
OUTPUT(WesternFile,,NAMED('WesternFile'));
OUTPUT(AnsiFile,,NAMED('AnsiFile'));
suleman Shreef
 
Posts: 21
Joined: Wed Feb 27, 2019 9:15 am

Thu Mar 07, 2019 7:30 pm Change Time Zone

Suleman,

Try changing your UNICODE data type to UTF8 and set the LOCALE on the RECORD structure (as specified in ISO standards 639 and 3166) to the correct code to support your character set.

HTH,

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

Fri Mar 08, 2019 5:44 am Change Time Zone

But,Richard
even though it is not working.. :roll:
suleman Shreef
 
Posts: 21
Joined: Wed Feb 27, 2019 9:15 am

Fri Mar 08, 2019 2:32 pm Change Time Zone

Suleman,

Did you add the LOCALE option to your RECORD structure?

I can try to duplicate your problem if you give me your code with inline data (not a reference to files that I can't get to).

HTH,

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

Sat Mar 09, 2019 1:11 am Change Time Zone

Thank you so much Richard, I done same thing what you said and its working fine,
once again thank you so much for your support.
suleman Shreef
 
Posts: 21
Joined: Wed Feb 27, 2019 9:15 am


Return to ECL

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron