-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Locale support for bsdtar #966
Comments
Looking into this further, I've confirmed that we are correctly compiling with HAVE_SETLOCALE. This looks like it actually might be an issue with how libarchive interprets mtree I think |
The mtree file format does not support multi-byte sequences; the contents of an mtree file are expected to be 7-bit ASCII. Content not conforming to that expectation must be represented using escape sequences:
Assuming you want UTF-81, "ő" can be represented as Footnotes
|
You're absolutely correct. The folks over on libarchive were polite enough to point this out to me: libarchive/libarchive#2384 (comment) They've mentioned this might be a nice feature for them in the future, but agree that it isn't a bug. I'll close this for now and use an awk or sed hack to clean up these paths in my own builds.. |
FWIW, I am trying to land a change to make that cleanup automatic if you use the |
The bsdtar supplied with bazel-lib doesn't support unicode in mtree files.
Bsdtar does seem to support locales, but only when compiled with HAVE_SETLOCALE https://github.com/libarchive/libarchive/blob/40ff837717b89e9a5d2c735758f503d124d17b72/tar/bsdtar.c#L190-L192
In the libarchive compilation that underpins this, it seems like we're configuring this for libarchive, but perhaps it isn't making its way to the bsdtar compilation? bazelbuild/bazel-central-registry@6050102#diff-7362d45a2c906ff9c0922ff1f104e88aa28197d9345dabbc18a7a5740f3959e6R1352
Does it also have to depend on
//:config
? I'm not particularly familiar with bazel cc rules.The text was updated successfully, but these errors were encountered: