Comments (6)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 ada4ko commented Permalink

I can't download files.

 
Not shared with you.
You do not have permission to view this file. The file is not public and is not shared with you.

2 SergeRielau commented Permalink

Adam,

 
Sorry about that.
That's what happens when I try to be creative with jet lag at an airport...
It should be fixed now.
 
Thanks for letting me know.
 
Cheers
Serge

3 MMostafa commented Permalink

I tried the SQL reverse function and it is working fine with english characters. But when I tried it with string contains arabic characters it fails.
May be because the length on arabic letters is 2 bytes.
Ex: محمد123
Please advice what is the possible solution.

4 SergeRielau commented Permalink

Mostafa,

 
This is odd, because I did test it with other 2-byte characters, like the German U-umlaut.
You are sure that you are on a Unicode database?
 
Cheers
Serge

5 Yonghang commented Permalink

Serge,

 
I think db2 may have special utf-8 implementation. according to my test all uses 4 characters.
 
values chr(194)||chr(168)||chr(194)||chr(185)
 
1
----
ü
 
1 record(s) selected.
 
db2 "values chr(195)||chr(140)||chr(195)||chr(172)"
 
1
----
 
1 record(s) selected.
 
 
 
MMostafa, can you share your test case?
pls print ascii(substr(yourstring,pos,$NN)) , NN from 1 to length(yourstring).

6 Yonghang commented Permalink

other than c, I tested with Java. with some German and Chinese characters. the byte list passed to java function is all right with the standard utf-8 definition.

 
interesting it's not the case in db2 itself layout if trying to print the byte list.