OpenCV(4.7.0-dev) Error: Assertion failed (buf) in cv::FileStorage::Impl::open, file C:\GHA-OCV-2_work\ci-gha-workflow\ci-gha-workflow\opencv\modules\core\src\persistence.cpp, line 681 Steps to reproduce OpenCV: terminate handler is called! The last OpenCV error is: Opencv_visualisation.exe -i C:\Users\test\Desktop\opencv\build\圆4\vc16\bin\HappyFish.jpg -m C:\Users\test\Desktop\opencv\build\圆4\vc16\bin\haarcascade_profileface.xml -data C:\Users\test\Desktop\opencv\build\圆4\vc16\bin\test -ext=mp4 -fourcc=H264 -fps=42 This behaviour seems unique to the test case, in my application (xCHM) all the wxCSConv objects I'm creating return true from IsOk().Operating System / Platform: Windows 10 圆4ħfab7be68a4ab7f1b70759b0e58d4c4ffc2b8aee72642df6f2dfcc6c161b2465 opencv-4.7.0-windows.exe Detailed description I later found out that m_encoding is private and thus cannot be accesed even if I inherited my own classes from wxCSConv.Ĭonverting a string would have been the next step, but what I perhaps was not able to properly communicate before, is that I don't know why IsOk() would return false after such a simple operation as creating a wxCSConv object, and not having unlimited time to investigate everything I'm expecting some explanation before I can continue. My first intention was to create those 4 wxCSConv objects, and then show that obj1.m_encoding = obj2.m_encoding, but obj3.m_encoding != obj4.m_encoding, which would have signaled a problem and hence be a relevant test. ![]() The fact that IsOk() returns true is necessary but not sufficient condition for that. maybe round trip something from UTF-8 to Big5 and back. I'd like to test that the actual conversions using Big5 work and produce the expected result, e.g. The createCSConvPtr() function I've pasted above should further clarify the issue.Īs for the test case, thanks for adding but this actually doesn't test that much. On Linux, the only way I could trick it into displaying properly was to use the wxCSConv(const wxChar*) constructor. Same code, same exact wxString, will display properly on Windows but not on Linux. That's the only way to display it properly, wxCSConv(wxFONTENCODING_BIG5) will NOT work. Identical bytes are properly displayed when converted through a wxCSConv(wxFONTENCODING_950) on Windows, but to display them properly on Linux with wxGTK I need to create a wxCSConv(wxT("BIG5")). The string that needs to be converted is the same string, yes. are they the same or not? The fact that creating wxCSConv(wxFONTENCODING_BIG5) doesn't currently work is clearly a problem but there are 2 ways of making it work and which one should be chosen depends on whether they're really the same or not. I meant to ask about the actual encodings. 19:22:16: rc (Razvan Cojocaru) commented My suggestion is to either remove the wxFONTENCODING_BIG5 = wxFONTENCODING_CP950 assignment, or make wxCSConv work with wxFONTENCODING_CP950. Unfortunately, now I can't use the wxCSConv constructor that takes a wxFontEncoding argument. ![]() If I change this line of my code thus, it works fine: WxFONTENCODING_BIG5 = wxFONTENCODING_CP950, // Traditional Chinese WxFONTENCODING_GB2312 = wxFONTENCODING_CP936, // Simplified Chinese ![]() _ alternative names for Far Eastern encodings ![]() However, in include/wx/fontenc.h there's this: In the same file, in gs_encodingDescs we see that gs_encodingDescs is "BIG5", and gs_encodingDescs is "Windows Chinese Traditional (CP 950)". After poking around for a while I found that in src/common/fmapbase.cpp wxFONTENCODING_BIG5 is being treated differently than wxFONTENCODING_CP950 (in gs_encodings). The code works very well with wxMSW, but it fails to do anything to the text with wxGTK/Linux. Return wxString(input.mb_str(convFrom), convTo) WxCSConv convTo(enc) // where enc = wxFONTENCODING_BIG5 WxCSConv convFrom(wxFONTENCODING_ISO8859_1) After reading the text into a wxString, I'm doing the following: I'm trying to display some Chinese BIG5 text in a wxTextCtrl. Component: base | priority: normal | resolution: fixed | keywords: wxCSConv, BIG5, Chinese 02:44:34: rc (Razvan Cojocaru) created the issue
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |