accent character handling
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
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
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
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
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
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
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
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
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.
once again thank you so much for your support.
- suleman Shreef
- Posts: 21
- Joined: Wed Feb 27, 2019 9:15 am
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests