all-charsets-X11 1.1 KB

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # Prints a table of the charsets (system dependent name, portable name, and
  3. # X11 name) for all locales.
  4. ${CC-cc} -o locale_codeset locale_codeset.c
  5. ${CC-cc} -o locale_charset -I../include locale_charset.c \
  6. -DHAVE_CONFIG_H -I.. -DLIBDIR='"'`cd ../lib && pwd`'"' \
  7. ../lib/localcharset.c
  8. ${CC-cc} -o locale_x11encoding locale_x11encoding.c \
  9. -I/usr/X11R6/include \
  10. -L/usr/X11R6/lib -lX11
  11. #${CC-cc} -o locale_x11encoding locale_x11encoding.c \
  12. # -I/packages/gnu/XFree86/include \
  13. # -L/packages/gnu/XFree86/lib -lX11 \
  14. # -Wl,-rpath,/packages/gnu/XFree86/lib
  15. printf '%-15s%-17s%-17s %-17s %-17s\n\n' \
  16. "locale name" "locale charmap" "nl_langinfo(CODESET)" "locale_charset()" "X11 encoding"
  17. for lc in `./all-locales | sort | uniq`
  18. do
  19. charmap=`LC_ALL=$lc ./locale_charmap 2>/dev/null || echo '<error>'`
  20. codeset=`LC_ALL=$lc ./locale_codeset 2>/dev/null || echo '<error>'`
  21. charset=`LC_ALL=$lc ./locale_charset 2>/dev/null || echo '<error>'`
  22. x11encoding=`LC_ALL=$lc ./locale_x11encoding 2>/dev/null || echo '<error>'`
  23. printf '%-15s %-17s %-17s %-17s %-17s\n' \
  24. "$lc" "$charmap" "$codeset" "$charset" "$x11encoding"
  25. done