Multibyte character [message #616636] |
Thu, 19 June 2014 04:14 |
elaiyavel
Messages: 114 Registered: April 2008
|
Senior Member |
|
|
Hi Team,
We have stored multibyte character data in our database columns.
We have a requirement to write these values to a fixed length file (position based). Since it is multibyte value, positions are getting extended and we cannot separate values at the right location.
Thanks,
Elaiyavel
|
|
|
|
|
Re: Multibyte character [message #616727 is a reply to message #616722] |
Fri, 20 June 2014 00:56 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
How is this an Oracle question.
If you think "position" as "byte position" (and not "char position"), you can use a fixed-length character set then each character is in a fixed number of bytes.
[Updated on: Fri, 20 June 2014 00:57] Report message to a moderator
|
|
|
Re: Multibyte character [message #616757 is a reply to message #616722] |
Fri, 20 June 2014 07:59 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
elaiyavel wrote on Fri, 20 June 2014 11:07Is there a way to write these multi byte character values to a position based file ?
What's the issue with using the classical way of generating CSV file.
|
|
|
|
|
Re: Multibyte character [message #616769 is a reply to message #616764] |
Fri, 20 June 2014 08:32 |
elaiyavel
Messages: 114 Registered: April 2008
|
Senior Member |
|
|
Yes Absolutely, for multi byte characters, some characters occupies addition space and columns are written to file beyond the allocated position.
Is there a way to convert multi byte characters to single byte and write to a file.
This will help in the case when writing to fixed length files.
|
|
|
|
|
Re: Multibyte character [message #616772 is a reply to message #616769] |
Fri, 20 June 2014 08:49 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
elaiyavel wrote on Fri, 20 June 2014 15:32Yes Absolutely, for multi byte characters, some characters occupies addition space and columns are written to file beyond the allocated position.
Is there a way to convert multi byte characters to single byte and write to a file.
This will help in the case when writing to fixed length files.
Quote:Yes Absolutely, for multi byte characters, some characters occupies addition space and columns are written to file beyond the allocated position.
You're wrong, you can generate a file with Unicode with fixed-width charecter set.
Quote:Is there a way to convert multi byte characters to single byte and write to a file.
Most likely you can generate a file with a proper 8-bit character set.
But as we don't know anything about your actual case we can't help more.
As Littlefoot asked you: post an example and specify with more details what you have and what you want.
[Updated on: Fri, 20 June 2014 08:49] Report message to a moderator
|
|
|
Re: Multibyte character [message #616773 is a reply to message #616769] |
Fri, 20 June 2014 09:06 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
elaiyavel wrote on Fri, 20 June 2014 19:02Yes Absolutely, for multi byte characters, some characters occupies addition space and columns are written to file beyond the allocated position.
You did not read the documentation link I provided above. It should remove all your confusions about character set.
|
|
|