[PATCH] D88741: [SystemZ/z/OS] Add utility class for char set conversion.

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 08:50:16 PDT 2020


Kai created this revision.
Kai added reviewers: uweigand, kbarton, yusra.syeda, hubert.reinterpretcast, tahonermann.
Herald added subscribers: llvm-commits, hiraditya, mgorny.
Herald added a project: LLVM.
Kai requested review of this revision.

This class adds support for conversion between different character
sets. The conversion between EBCDIC-1047 and Latin-1/UTF-8 is always
available. If the iconv library is installed, then all conversions
of the iconv library can be used, too.

Use of iconv functions is not as standarddized as wanted.
Challenges found so far:

- On some functions, the iconv*() functions are part of the C library. On other systems, a separate library must be linked in.
- Their are systems with multiple, incompatible implementations of iconv functionality.
- Not each system provides an implementation.
- Mapping of EBCDIC-1047 to ASCII/Latin-1/UTF-8 and vice versa is done differently on different platforms.
- Each implementation supports different mappings.

As result, the implementation provides a thin wrapper around the
iconv functionality, including a fixed conversion for EBDIC-1047.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88741

Files:
  llvm/cmake/config-ix.cmake
  llvm/include/llvm/Config/config.h.cmake
  llvm/include/llvm/Support/CharSet.h
  llvm/lib/Support/CMakeLists.txt
  llvm/lib/Support/CharSet.cpp
  llvm/unittests/Support/CMakeLists.txt
  llvm/unittests/Support/CharSetTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88741.295839.patch
Type: text/x-patch
Size: 21036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201002/f2172806/attachment.bin>


More information about the llvm-commits mailing list