Sponsored Content
Operating Systems Linux Red Hat How to load a charset on RHEL 6.6 ? Post 302937853 by Fundix on Tuesday 10th of March 2015 05:25:03 AM
Old 03-10-2015
Question How to load a charset on RHEL 6.6 ?

Hi all,

am running the following code on a RHEL 6.6 box to list which charsets are loaded and which are available:
Code:
#!/usr/bin/perl -w
use strict;
use Encode;

my @list = Encode->encodings();
my @all_encodings = Encode->encodings(":all");

print "@list\n\n";
print "@all_encodings\n";

output :
Code:
ascii ascii-ctrl iso-8859-1 null utf-8-strict utf8

7bit-jis AdobeStandardEncoding AdobeSymbol AdobeZdingbat ascii ascii-ctrl big5-eten big5-hkscs cp1006 cp1026 cp1047 cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp37 cp424 cp437 cp500 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp858 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp875 cp932 cp936 cp949 cp950 dingbats euc-cn euc-jp euc-kr gb12345-raw gb2312-raw gsm0338 hp-roman8 hz iso-2022-jp iso-2022-jp-1 iso-2022-kr iso-8859-1 iso-8859-10 iso-8859-11 iso-8859-13 iso-8859-14 iso-8859-15 iso-8859-16 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-ir-165 jis0201-raw jis0208-raw jis0212-raw johab koi8-f koi8-r koi8-u ksc5601-raw MacArabic MacCentralEurRoman MacChineseSimp MacChineseTrad MacCroatian MacCyrillic MacDingbats MacFarsi MacGreek MacHebrew MacIcelandic MacJapanese MacKorean MacRoman MacRomanian MacRumanian MacSami MacSymbol MacThai MacTurkish MacUkrainian MIME-B MIME-Header MIME-Header-ISO_2022_JP MIME-Q nextstep null posix-bc shiftjis symbol UCS-2BE UCS-2LE UTF-16 UTF-16BE UTF-16LE UTF-32 UTF-32BE UTF-32LE UTF-7 utf-8-strict utf8 viscii

My question is how to load a new charset (iso-8859-15) on my RHEL box ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in wrting Load Script for a Load-Resume type of load.

hi all need your help. I am wrting a script that will load data into the table. then on another load will append the data into the existing table. Regards Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies

2. UNIX for Advanced & Expert Users

Unix charset

Hi, How can I find out the charset on a Unix server (SUNOS 5.2)? I tried locale charmap and returned 646. What does 646 mean? If I send an xml file with encoding="utf-8", should the server be able to handle the file, even with special characters in it? Thanks. (0 Replies)
Discussion started by: iengca
0 Replies

3. SuSE

sqlldr : charset conversion while loading ?

Hi, I am a newbie to Linux(Suse).I am facing a problem with 'sqlldr' utility while trying to upload data to Database tables.My backend is Oracle and is using the UTF8 encoding format.I am trying to load a datafile which contains some Western European Characters.While loading am getting an... (0 Replies)
Discussion started by: DILEEP410
0 Replies

4. Shell Programming and Scripting

Problem identifying charset of a file

Hi all, My objective is to find out the charset using which a file is encoded. (The OS is SunOs) I have set NLS_LANG to AR8MSWIN1256 and spooled the file. When viewed the file using vi, I saw the following \307\341\321\355\307\326 I then inserted the line containing these codes in a... (3 Replies)
Discussion started by: sridhar_423
3 Replies

5. Shell Programming and Scripting

Likely charset issue with tree command?

Hi All I'm using a tree command in a script that for me outputs:- | - - DIRECTORYNAME However a different user is getting the following output:- aaa (actually with an umlat above them) DIRECTORYNAME I'm not sure where this could be coming from, any ideas anyone? (0 Replies)
Discussion started by: Bashingaway
0 Replies

6. Red Hat

Does RHEL 5 provide a command to collect RHEL system log in single compress file?

Hi, I heard a command that can collect all RHEL 5 log in a single compress file before I forget. Does any body know...What the command is ? Thanks. (4 Replies)
Discussion started by: nnnnnnine
4 Replies

7. UNIX for Dummies Questions & Answers

locale and glibc and charset

what's the relationship among locale, glibc, charset, charmap and fonts? why locale needs to be generated by glibc? how? what are in the locale-archive file? and what are in font files? (0 Replies)
Discussion started by: vistastar
0 Replies

8. UNIX for Advanced & Expert Users

ISO 88591 file encoding charset in Linux

Hello Experts, please help to provide any insight as I am facing issue migrating java application from hpux to redhat. The java program is using InputStreamReader to read a file without specifying any charset parameter. However, in new Linux Redhat 5.6 environent, when reading a file that... (1 Reply)
Discussion started by: sonic_air
1 Replies

9. Red Hat

Error throwing while installing vsftpd package in rhel 6. using rhel 6 dvd.

Hi all, Im studying rhcsa as of now, so yum installation and dependencies are messing me to not workit out. i have dual os, win 7 & rhel 6. i have tried this installation of vsftpd package with rhel 6 dvd in VM rhel 6 in win 7 as well as host rhel 6.still the same issue. below error... (6 Replies)
Discussion started by: redhatlbug
6 Replies

10. UNIX for Dummies Questions & Answers

RHEL6 Terminal Charset Encoding

Hi All, I'm facing an issue when i ssh to a router and exporting the output to a txt file. ssh johndoe@10.0.0.1 -a | tee file.txt Closing the connection and opening the .txt file. There are strange 'domino's' appearing here and there. See the screenshot below. ... (2 Replies)
Discussion started by: Antonio Fargas
2 Replies
XCreateFontSet(3)						  XLIB FUNCTIONS						 XCreateFontSet(3)

NAME
XCreateFontSet, XFreeFontSet - create and free an international text drawing font set SYNTAX
XFontSet XCreateFontSet(Display *display, char *base_font_name_list, char ***missing_charset_list_return, int *miss- ing_charset_count_return, char **def_string_return); void XFreeFontSet(Display *display, XFontSet font_set); ARGUMENTS
display Specifies the connection to the X server. base_font_name_list Specifies the base font names. def_string_return Returns the string drawn for missing charsets. font_set Specifies the font set. missing_charset_count_return Returns the number of missing charsets. missing_charset_list_return Returns the missing charsets. DESCRIPTION
The XCreateFontSet function creates a font set for the specified display. The font set is bound to the current locale when XCreateFontSet is called. The font set may be used in subsequent calls to obtain font and character information and to image text in the locale of the font set. The base_font_name_list argument is a list of base font names that Xlib uses to load the fonts needed for the locale. The base font names are a comma-separated list. The string is null-terminated and is assumed to be in the Host Portable Character Encoding; otherwise, the result is implementation-dependent. White space immediately on either side of a separating comma is ignored. Use of XLFD font names permits Xlib to obtain the fonts needed for a variety of locales from a single locale-independent base font name. The single base font name should name a family of fonts whose members are encoded in the various charsets needed by the locales of inter- est. An XLFD base font name can explicitly name a charset needed for the locale. This allows the user to specify an exact font for use with a charset required by a locale, fully controlling the font selection. If a base font name is not an XLFD name, Xlib will attempt to obtain an XLFD name from the font properties for the font. If this action is successful in obtaining an XLFD name, the XBaseFontNameListOfFontSet function will return this XLFD name instead of the client-supplied name. Xlib uses the following algorithm to select the fonts that will be used to display text with the XFontSet. For each font charset required by the locale, the base font name list is searched for the first appearance of one of the following cases that names a set of fonts that exist at the server: o The first XLFD-conforming base font name that specifies the required charset or a superset of the required charset in its CharSetReg- istry and CharSetEncoding fields. The implementation may use a base font name whose specified charset is a superset of the required charset, for example, an ISO8859-1 font for an ASCII charset. o The first set of one or more XLFD-conforming base font names that specify one or more charsets that can be remapped to support the required charset. The Xlib implementation may recognize various mappings from a required charset to one or more other charsets and use the fonts for those charsets. For example, JIS Roman is ASCII with tilde and backslash replaced by yen and overbar; Xlib may load an ISO8859-1 font to support this character set if a JIS Roman font is not available. o The first XLFD-conforming font name or the first non-XLFD font name for which an XLFD font name can be obtained, combined with the required charset (replacing the CharSetRegistry and CharSetEncoding fields in the XLFD font name). As in case 1, the implementation may use a charset that is a superset of the required charset. o The first font name that can be mapped in some implementation-dependent manner to one or more fonts that support imaging text in the charset. For example, assume that a locale required the charsets: ISO8859-1 JISX0208.1983 JISX0201.1976 GB2312-1980.0 The user could supply a base_font_name_list that explicitly specifies the charsets, ensuring that specific fonts are used if they exist. For example: "-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240-JISX0208.1983-0, -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120-JISX0201.1976-0, -GB-Fixed-Medium-R-Normal--26-180-100-100-C-240-GB2312-1980.0, -Adobe-Courier-Bold-R-Normal--25-180-75-75-M-150-ISO8859-1" Alternatively, the user could supply a base_font_name_list that omits the charsets, letting Xlib select font charsets required for the locale. For example: "-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240, -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120, -GB-Fixed-Medium-R-Normal--26-180-100-100-C-240, -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150" Alternatively, the user could simply supply a single base font name that allows Xlib to select from all available fonts that meet certain minimum XLFD property requirements. For example: "-*-*-*-R-Normal--*-180-100-100-*-*" If XCreateFontSet is unable to create the font set, either because there is insufficient memory or because the current locale is not sup- ported, XCreateFontSet returns NULL, missing_charset_list_return is set to NULL, and missing_charset_count_return is set to zero. If fonts exist for all of the charsets required by the current locale, XCreateFontSet returns a valid XFontSet, missing_charset_list_return is set to NULL, and missing_charset_count_return is set to zero. If no font exists for one or more of the required charsets, XCreateFontSet sets missing_charset_list_return to a list of one or more null- terminated charset names for which no font exists and sets missing_charset_count_return to the number of missing fonts. The charsets are from the list of the required charsets for the encoding of the locale and do not include any charsets to which Xlib may be able to remap a required charset. If no font exists for any of the required charsets or if the locale definition in Xlib requires that a font exist for a particular charset and a font is not found for that charset, XCreateFontSet returns NULL. Otherwise, XCreateFontSet returns a valid XFontSet to font_set. When an Xmb/wc drawing or measuring function is called with an XFontSet that has missing charsets, some characters in the locale will not be drawable. If def_string_return is non-NULL, XCreateFontSet returns a pointer to a string that represents the glyphs that are drawn with this XFontSet when the charsets of the available fonts do not include all font glyphs required to draw a codepoint. The string does not necessarily consist of valid characters in the current locale and is not necessarily drawn with the fonts loaded for the font set, but the client can draw and measure the default glyphs by including this string in a string being drawn or measured with the XFontSet. If the string returned to def_string_return is the empty string (""), no glyphs are drawn, and the escapement is zero. The returned string is null-terminated. It is owned by Xlib and should not be modified or freed by the client. It will be freed by a call to XFreeFontSet with the associated XFontSet. Until freed, its contents will not be modified by Xlib. The client is responsible for constructing an error message from the missing charset and default string information and may choose to con- tinue operation in the case that some fonts did not exist. The returned XFontSet and missing charset list should be freed with XFreeFontSet and XFreeStringList, respectively. The client-supplied base_font_name_list may be freed by the client after calling XCreateFontSet. The XFreeFontSet function frees the specified font set. The associated base font name list, font name list, XFontStruct list, and XFontSe- tExtents, if any, are freed. SEE ALSO
XExtentsofFontSet(3), XFontsOfFontSet(3), XFontSetExtents(3) Xlib - C Language X Interface X Version 11 libX11 1.6.0 XCreateFontSet(3)
All times are GMT -4. The time now is 08:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy