Write file with WRITESEQ in UTF-8 encoding
- elenaABB
- Topic Author
- Offline
- New Member
-
- Posts: 3
- Thank you received: 0
Is it possible with tafc to export data from Globus tables in UTF-8 encoding?
Our routines seem to produce iso-8859-1 encoded files. But we have Greek characters in some fields which cannot be displayed correctly in iso-8859-1. So we want a UTF-8 encoded file to be produced and used as import in a mysql database. But even if we use UTF8 function
the output file is the same.
When we try to convert iso-8859-1 or utf-8 file to iso-8859-7(greek) with iconv we get
an illegal input sequence error.
Could anyone please help?
Thank you
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
Conversion Utility
A conversion tool ‘jutf8’ has been provided to help with the file conversion. The first would be to
restore the data in the normal way using a restore process working in binary mode. Once the files
have been restored, use the following utility with the imported data files to convert the data. The
syntax of the conversion utility is as follows:
jutf8 {-options} {filename {,...} }
Where options can be:
c The code page to use for conversion, default latin1
d Process directories
f Force mode, skip prompt for confirmation
-m MapFilePath Use specified map file for conversion
-s Skip sample testing for file already converted
-u Convert from UTF-8 to code page, i.e., reverse conversion
-v Verbose mode
The conversion utility, by default, will attempt to confirm that the data is not already converted
into UTF-8. Directories are skipped by default unless the –d option is explicitly specified.
NOTE: the conversion of file contents containing binary data such as compiled programs may
render the compiled object no longer usable. It is recommended that the files be cleared of
program object files before use of the utility on source files.
Please Log in or Create an account to join the conversation.
- elenaABB
- Topic Author
- Offline
- New Member
-
- Posts: 3
- Thank you received: 0
JBASE_LOCALE has the value of C in our system. As I understand the input is in Greek
but the greek character is saved in latin1(iso-8859-1) in the database(internationalisation is not set) so it cannot be converted back to utf8 or iso-8859-7. Then why is it diplayed correctly in Globus desktop? How I can I convert the database in utf-8?
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
The display inside desktop may be related to ASCII.VALUES / ASCII.VAL.TABLE ?
Please Log in or Create an account to join the conversation.
- elenaABB
- Topic Author
- Offline
- New Member
-
- Posts: 3
- Thank you received: 0
iconv -f iso-8859-7 -t utf8 < input_file > output_file
and then importing output_file in a utf-8 mysql database it works.
I don't know why.
Thanks
Please Log in or Create an account to join the conversation.