Summary: | Call ansi functions directly, to be able to compile with different -DUNICODE variants | ||
---|---|---|---|
Product: | poppler | Reporter: | Christoph Cullmann <cullmann> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | hib, Thomas.Freitag |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Patch to call A variants
Updated patch, missed some functions, compiles no in our CI |
Description
Christoph Cullmann
2017-03-22 07:00:42 UTC
Created attachment 130371 [details] [review] Updated patch, missed some functions, compiles no in our CI Tomas, Hib, you've sent some windows patches. Comments on this? The patch removes the ability of using unicode filesystem and force to use always the ANSI version of several functions. I.e. #ifdef UNICODE #define GetModuleFileName GetModuleFileNameW #else #define GetModuleFileName GetModuleFileNameA #endif // !UNICODE is defined in winbase.h. So I can't see why this patch makes sense? > So I can't see why this patch makes sense?
There is no way to use the unicode variants as all calling code assumes you can feed in char * everywhere.
If you want to use the unicode variants, you need to rewrite all code calling these things.
(Otherwise it would compile with UNICODE set, btw.)
(In reply to Christoph Cullmann from comment #1) > Created attachment 130371 [details] [review] [review] > Updated patch, missed some functions, compiles no in our CI I agree with explicitly specifying the A or W variant for all win32 API that takes strings. The win32 code in gfile.cc should be updated to accept UTF8 strings and convert to UTF16 and call the W variant to ensure full unicode support. This would avoid all the win32 specific code in other locations eg PDFDoc.cc line 173. We should consistently use UTF8 in poppler code and just do the conversion to wchar_t in the win32 portability code. > I agree with explicitly specifying the A or W variant for all win32 API that takes strings.
Does that mean this can be merged?
(In reply to Christoph Cullmann from comment #6) > > I agree with explicitly specifying the A or W variant for all win32 API that takes strings. > > Does that mean this can be merged? I don't know the second paragraph from Adrian goes into "i don't really care enough about poppler/Windows to try to understand that". So i'll leave it into Adrian's hand since at least he seems to understand enough of it ;) Pushed |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.