Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC4_dev] Use Win32 Unicode APIs and expect all strings to be UTF-8 (fixes #1765) #1839

Merged
merged 26 commits into from
Jan 22, 2020

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 10, 2020

Not completely RFC4 specific but proper unicode support for Windows is now really needed given all the file manipulations we do.
continuation of PR #1826, starting with commit f6c4241

- Move content of legacy apply_gridshift.cpp and apply_vgridshift.cpp in grids.cpp
- Rename nad_ functions to pj_hgrid_
- Rename internal proj_hgrid_/proj_vgrid_ functions to pj_
…o#1765)

For backward compatibility, if PROJ_LIB content is found to be not UTF-8 or
pointing to a non existing directory, then an attempt at interpretating it
in the ANSI page encoding is done.

proj_context_set_search_paths() now assumes strings to be in UTF-8, and
functions returning paths will also return values in UTF-8.
@rouault rouault force-pushed the rfc4_utf8 branch 6 times, most recently from d73a749 to b8b6f74 Compare January 14, 2020 00:09
@rouault rouault force-pushed the rfc4_utf8 branch 3 times, most recently from a754945 to 929f37b Compare January 14, 2020 22:16
Copy link
Member

@kbevers kbevers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bulk of this PR is the unicode stuff which isn't something I feel comfortable reviewing. I hope someone else can review this.

I appreciate that a replacement for the proj_api.h fileAPI has been added to proj.h. On a functional level I am also happy to see unicode support added!

@rouault
Copy link
Member Author

rouault commented Jan 18, 2020

The bulk of this PR is the unicode stuff

It is largely inspired from what is used in GDAL: UTF-8 <--> widechar conversions and use of Win32 Widechar File APIs

@rouault
Copy link
Member Author

rouault commented Jan 20, 2020

@hobu Want to give that a review ?

src/grids.cpp Show resolved Hide resolved
src/grids.cpp Show resolved Hide resolved
src/grids.cpp Show resolved Hide resolved
src/proj_internal.h Show resolved Hide resolved
test/cli/Makefile.am Show resolved Hide resolved
test/unit/gie_self_tests.cpp Show resolved Hide resolved
@rouault
Copy link
Member Author

rouault commented Jan 20, 2020

@hobu Parts of your comments are valid, but you're actually reviewing old commits. The one specifics of this PR start with f6c4241 . In order to avoid painful rebase, I queue review commits in the most recent pull request of this rfc4_dev series, currently #1857

rouault added a commit to rouault/PROJ that referenced this pull request Jan 20, 2020
@rouault
Copy link
Member Author

rouault commented Jan 21, 2020

Unless someone has further comments, I'll merge that tomorrow

@rouault rouault merged commit c5fb541 into OSGeo:rfc4_dev Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants