Hi All,
I'm trying to represent Local NLS characters in a UTF8 string.
These characters are a result of a Base64 source code.
English translates fine, but, local characters are not.
So I'm getting a source string with only A-Z,a-z,0-9,+-= as the input characters (for those not familiar with Base64) and I use some DS Basic to decode the string to it's original source string(the routine binary, in a DSX export file, is posted in the FAQ Forum).
My problem is to get the resulting numbers using the UNICHAR() function to represent local NLS characters in the UTF8 locale.
Setting the Sequential File NLS property doesn't help. I'm using notepad++ to view the file after it is written to avoid DS Client viewing issues.
I'm probably overlooking something, Any ideas?
Thanks in advance for your time
Representing Local NLS characters in UTF8
Moderators: chulett, rschirm, roy
Representing Local NLS characters in UTF8
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
I got to calculate the unicode number for my specific character.
But still UNICHAR(55184) (i.e.) dosen't seem to get me the desired effect.
Using notepad++ I should be able to see it correctly when I write to a sequential file using UTF-8 NLS setting , no?!
But still UNICHAR(55184) (i.e.) dosen't seem to get me the desired effect.
Using notepad++ I should be able to see it correctly when I write to a sequential file using UTF-8 NLS setting , no?!
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Notepad++ has a plugin utility for encoding & decoding of base64. since when I use it to decode my source string in UTF8 it shows fine I expect opening the file I built and see the desired outcome. Though my last test leads me to believe I still need to fix something in my logic... We'll see tomorrow ...
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Well got it working (hoping fine ths time )
The catch with writing t Seq File is that I had to set the NLS to unicode using the right side check box "Use UNICODE map" and unchecking the other 2 checkboxes.
Now I'm waiting for test results to confirm (hopefully) a successfull test.
P.S.
I'll update the FAQ post with a new binary.
The catch with writing t Seq File is that I had to set the NLS to unicode using the right side check box "Use UNICODE map" and unchecking the other 2 checkboxes.
Now I'm waiting for test results to confirm (hopefully) a successfull test.
P.S.
I'll update the FAQ post with a new binary.
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org