Qt4 character transcoding crash exception

Source: Internet
Author: User

License plate recognition equipment returned to the license plate results for GB2312,QT to be able to parse the display, it is necessary to transcode, qstring storage Unicode, the implementation of code simple as follows

Char plate_num[256] = {0};
QString m_strvehplate;
M_strvehplate = Qtextcodec::codecforname ("GB18030")->tounicode (Plate_num);
When calling the Transcoding interface crashes (compile the program to release version, in the real environment test), so the use of writing is not a problem, the cause of the crash may be not dependent on the execution of the dynamic link library, so at this time to put the plug-in library in the program run directory, plugins, It contains commonly used plug-in library files, and the code to include the plug-in library:

Qapplication::addlibrarypath (Qobject::tr ("./plugins"));

Compile and run the program again.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.