Previous Topic Next topic Print topic


Configuring the cobutf8 Configuration File

The configuration file is located in the $COBDIR/etc directory, and is named cobutf8.cfg. You must not rename or move this file, otherwise you will receive an error when running the utility.

This file comes pre-configured with the mappings for Japanese Shift-JIS character encodings. You can also add your own mappings, specifying one or more supported locales, and mapping them to character sets supported by the iconv() function.

Add a mapping

Tip: To list the supported locales, use the locale -a command; to list the character sets supported by iconv(), use the iconv -l command.

To add a new mapping, open the configuration file in a text editor, and on a new line, enter at least one target locale - if you are planning to map other locales to the same character set, also enter those locales on the same line, delimited by one or more whitespace characters. Delimited again by whitespace, enter a character set supported by iconv() on the same line.

In the following example configuration file, a new mapping has been added for the Korean locale:

# Additional mappings can be added using the following format:
# <LOCALE> [LOCALE2 ...] <ICONV>\n
# Key:	<...> 	Mandatory#	[...]	Optional
# Values can be delimited using any non-line breaking whitespace.
# <ICONV> must be followed by a newline.
ja_JP.sjis  ja_JP.SJIS   SJIS-OPEN    #Shift-JIS
ja_JP.ujis  ja_JP.UJIS   UJIS         #UJIS
ja_JP.eucJP ja_JP.eucjp  EUCJP-OPEN   #EUC Japanese
ko_KR.euckr              CP949        #Korean
Previous Topic Next topic Print topic