[PROJ] PROJ and Unicode on Windows

Peter Townsend peter.townsend at maplarge.com
Wed Apr 5 14:44:03 PDT 2023


I've got a bit of an annoyance with my windows proj build. Hopefully it's
not too hard to resolve as the world of char/wchar_t/etc. isn't something
I'm terribly familiar with.

Take for example the area of use of EPSG:23031. On Linux it's fine, but on
windows there's a unicode issue.

PJ* crs = proj_create(m_ctxt, "EPSG:23031");
ASSERT_NE(crs, nullptr);
ObjectKeeper keeper_crsH(crs);

double w, s, e, n;
const char* a;
proj_get_area_of_use(m_ctxt, crs, &w, &s, &e, &n, &a);

Contents of a:
"Europe - between 0°E and 6°E - Andorra; Denmark (North Sea); Germany
offshore; Netherlands offshore; Norway including Svalbard - onshore and
offshore; Spain - onshore (mainland and Balearic Islands); United Kingdom
(UKCS) offshore."

Is there a simple thing I'm overlooking in the build process that might
clear up the encoding goof? Or do I need to do some bending over backwards
with character manipulation?

This is the command line I'm using to build this example:
cmake -DBUILD_SHARED_LIBS=ON
-DCMAKE_TOOLCHAIN_FILE=C:\dev\vcpkg\scripts\buildsystems\vcpkg.cmake ..
cmake --build . --config Debug -j 8

Thanks!
-- 
Peter Townsend
Senior Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20230405/4c42ce6a/attachment.htm>


More information about the PROJ mailing list