Write file with WRITESEQ in UTF-8 encoding

  • elenaABB
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago #14493 by elenaABB
Hi,

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
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 11 months ago #14494 by jpb
There is a utility jutf8 that might help (write the SEQ file normally and use the utility afterwards ?)

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
  • New Member
More
11 years 11 months ago #14498 by elenaABB
Replied by elenaABB on topic Write file with WRITESEQ in UTF-8 encoding
Thank you very much for your reply, but this utility expects a jbase file for input and I have a plain text file.
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
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 11 months ago #14499 by jpb
As they talk about "compiled programs" I didn't expect the input must be a jbase file ...

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
  • New Member
More
11 years 10 months ago #14510 by elenaABB
Replied by elenaABB on topic Write file with WRITESEQ in UTF-8 encoding
Although the encoding is en_us by converting the file with iconv
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.

Time to create page: 0.037 seconds