Click here to Skip to main content
15,884,085 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to encode and decode in various languages using zxing?
Ex. If I encode one japanies string then it should decode in same.
I have changed current threads culture to japanies but still its not decoding.
A have encoded this "親愛なる歓迎" and getting this "????????"; even after changing culture.

Please guide..

Thanks in advance
-Vivek Deshmukh
Posted
Updated 16-Aug-12 21:40pm
v3
Comments
Kenneth Haugland 17-Aug-12 2:15am    
Agin... My dear?
Vivek Deshmukh 17-Aug-12 2:19am    
No dear,
This time different. Please check updated

 
Share this answer
 
Comments
Vivek Deshmukh 17-Aug-12 5:42am    
hi vinod,
I got the solution.
I just change the CHARACTER_SET format to UTF-8 while encoding and works without culture setting.
Vivek Deshmukh 17-Aug-12 5:48am    
Hi vinod,
I got one image from client which is encoded in Japanies. while decoding it am getting this error
"An unhandled exception of type 'com.google.zxing.ReaderException' occurred in zxing.dll" in Detector class Line number 218. Any suggestion ?
Renju Vinod 17-Aug-12 8:01am    
Hi Vivek,
While decoding also you have to specify the hint.
Hashtable hints = new Hashtable ();
                        hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
// Encode function is having Japanese characters as input 
            ByteMatrix byteIMG = qrCode.encode("親愛なる歓迎$#@25", BarcodeFormat.QR_CODE, 120, 120, hints);
 
Share this answer
 
v2
Comments
Renju Vinod 17-Aug-12 5:55am    
Hi Vivek,
EncodeHintType.CHARACTER_SET is there but there is no DecodeHintType.CHARACTER_SET in that DLL that why its showing error.In that url there is another dll which having that option.
Renju Vinod 17-Aug-12 5:57am    
The actual error is
'UTF8' is not a supported encoding name.
Parameter name: name

While Decoding
Vivek Deshmukh 28-Aug-12 2:20am    
hi vinod,
Need your help once again.
I have created zxing related question here.http://www.codeproject.com/Questions/448193/zxing-winrt-library-WriteableBitmap-does-not-conta

Please guide me..
Vivek Deshmukh 17-Aug-12 6:47am    
Hi Vinod,
This error I got while encoding, so for this I have passed encoding parameter and it resolved.this as
Hashtable hints = new Hashtable ();
hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
It decoded also well. but the images I received from client giving error as above while decoding.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900