Here are the two versions of the open source download for C # and Java:
C#:http://www.codeproject.com/articles/20574/open-source-qrcode-library
Java:https://github.com/zxing/zxing
I have only tested the C # version, the following is the test process encountered problems and solutions:
1, the first operation error message is as follows:
The error "ThoughtWorks.QRCode.Properties.Resources" does not contain the definition of "getresource"
Workaround:
Only need to put: "MemoryStream MemoryStream = new MemoryStream (Resources.getresource (fileName));" are modified to "MemoryStream MemoryStream = new MemoryStream ((byte[]) Resources.ResourceManager.GetObject (fileName));"
Through the above changes, the support for English is directly run to pass. There's no problem with generating and parsing.
At this time if you are input Chinese, after the run is unresponsive, then you need to modify the source code as follows:
1. Modify QRCodeEncoder.cs and QRCodeDecoder.cs files to replace Encoding.unicode with Encoding.UTF8
UnicodeEncoding encoding = new UnicodeEncoding () in QRCodeUtility.cs in 2.util directory, replace with utf8encoding encoding = new UTF8Encoding ();
Then run the generated two-dimensional code, for Chinese can be recognized!
This is the end of the sharing, the above solutions are collected by the network.
C # Generate and parse two-dimensional code