.****************************************************************************** .* RXULS.IPF * .* Documentation for RxULS in OS/2 IPF format. * .* (C) 2009 Alex Taylor * .* * .* LICENSE: * .* * .* Redistribution and use in source and binary forms, with or without * .* modification, are permitted provided that the following conditions are * .* met: * .* * .* 1. Redistributions of source code must retain the above copyright * .* notice, this list of conditions and the following disclaimer. * .* * .* 2. Redistributions in binary form must reproduce the above copyright * .* notice, this list of conditions and the following disclaimer in the * .* documentation and/or other materials provided with the distribution. * .* * .* 3. The name of the author may not be used to endorse or promote products * .* derived from this software without specific prior written permission. * .* * .* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR * .* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * .* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * .* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * .* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * .* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * .* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * .* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * .* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * .* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * .* POSSIBILITY OF SUCH DAMAGE. * .****************************************************************************** :userdoc. :title.REXX Universal Language Support .****************************************************************************** :h1 x=left y=bottom width=100% height=100% id=intro.Introduction :p.REXX Universal Language Support (RxULS) provides a REXX interface to selected parts of the OS/2 Universal Language Support API (ULS). :p.ULS was designed to facilitate the development of internationalized programs in conjunction with the Unicode standard. For this reason, ULS is sometimes referred to as the OS/2 Unicode API. :p.Using RxULS, it becomes possible to&colon. :ul compact. :li.Search or transform text strings according to locale-specific rules. :li.Query locale information. :li.Convert text strings from one codepage to another, including to or from Unicode encodings such as UTF-8 and UCS-2. :li.Access Unicode-encoded clipboard text. :eul. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=unicode.What is Unicode? :p.Unicode is a character standard designed to allow all possible characters from all known writing systems to be represented on computer systems in an interchangeable form. :p.The Unicode standard covers many different aspects of text encoding. One of the most important is its goal of assigning a unique numeric value to virtually every character in existence. The part of the standard which defines these mappings is also known as the Universal Character Set (UCS), and it makes it possible for a vast range of unique characters from many different languages to be represented consistently and unambiguously. :p.OS/2 ULS supports only UCS Plane 1 (the Basic Multilingual Plane), but this nonetheless covers almost all languages currently in use around the world. :p.The Unicode standard is maintained by the Unicode Consortium (https&colon.//www.unicode.org/). .****************************************************************************** :h1 x=left y=bottom width=100% height=100% id=using.Using REXX Universal Language Support :p.As with all REXX libraries, you must register the RxULS functions before you can use them. The :link reftype=hd refid=ulscontrol.ULSLoadFuncs:elink. function can be used to register all other RxULS functions at once. :xmp. CALL RxFuncAdd 'ULSLoadFuncs', 'RXULS', 'ULSLoadFuncs' CALL ULSLoadFuncs :exmp. :p.Similarly, :link reftype=hd refid=ulscontrol.ULSDropFuncs:elink. deregisters all RxULS functions. :xmp. CALL ULSDropFuncs :exmp. :p. :p.The remainder of this chapter contains various notes on using RxULS and on working with codepages and Unicode. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=codepages.Codepages :p.Internally, computers represent all data (whether text, images, program code, or anything else) as sequences of 8-bit binary numbers called bytes. A :hp2.codepage:ehp2. is simply an encoding table used to translate bytes into human-readable text. When you attempt to view bytes as text, the computer uses whichever codepage is currently active to determine which characters are represented by various byte values. :p.For largely historical reasons, most codepages support only one or two specific languages or character sets. And, because different people have different needs, a great many different codepages have been defined. :p.Every OS/2 session has a specific, active, codepage known as the :hp2.process codepage:ehp2.. The :hp2.CHCP:ehp2. command can be used to change the process codepage - but only to a codepage which is currently listed in the CONFIG.SYS :hp2.CODEPAGE:ehp2. setting. A maximum of two codepages at any one time may be used in this way, and only certain codepages are supported. :p.Using RxULS, you can convert text from one codepage to another, or to and from various Unicode text encodings, without having to change the process codepage. :p.A list of OS/2 codepages is provided as :link reftype=hd refid=appa.Appendix A:elink.. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=utf.Unicode text encodings :p.Unicode text can be encoded in several different ways. ULS, and thus RxULS, supports three such encodings. Like all other text encodings native to OS/2, they are implemented as codepages. :dl break=all. :dt.UCS-2 (codepage 1200) :dd.The oldest and simplest Unicode encoding, in which each character is a fixed-width two-byte integer value corresponding to its assigned UCS number. OS/2 uses UCS-2 for internal processing, but it is not suitable for output as it contains embedded zero bytes. :dt.UTF-8 (codepage 1208) :dd.A variable-width encoding, in which each character is represented by one to four bytes, depending on its UCS value. UTF-8 has many properties designed to make it advantageous for data interchange. It is backwards compatible with single-byte ASCII (all ASCII text is also valid UTF-8 text); it requires on average slightly less storage space than UCS-2; and it uses a robust encoding algorithm which guarantees that a lost or corrupted byte can only compromise the current character, and not the rest of the data stream. :p.On the other hand, the UTF-8 algorithm is quite complex, which may generate noticeable overhead under some circumstances. For this reason, it is generally used for output and interchange, rather than for internal processing. :dt.UPF-8 (codepage 1207) :dd.This is a private variable-width encoding specific to OS/2, designed for use under Presentation Manager. UPF-8 requires from one to three bytes to represent each character, but has less processing overhead than UTF-8. It should not be used for data interchange. :edl. :p.Both UCS-2 and UPF-8 are of limited use in a REXX environment. UCS-2 cannot be used for meaningful text output, and is not commonly used for data interchange. UPF-8 cannot be used for interchange either, being a proprietary OS/2-specific encoding, and can only be effectively used for output under Presentation Manager when the message-queue codepage can be modified at runtime (which is not generally possible from REXX). :p.Consequently, UTF-8 is probably the most useful Unicode encoding from a REXX programmer's point of view. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ucs2.Working with UCS-2 text :p.ULS encodes all Unicode text internally in UCS-2 format. In all likelihood, you will generally be working with text that has been converted into a specific codepage. However, it is possible to return data from RxULS functions directly in UCS-2 format, by specifying an output codepage of 1200. :p.While the use of embedded null bytes in UCS-2 data presents problems in programming languages like C, REXX suffers from no such limitation. You can therefore use standard REXX functions to work with UCS-2 strings. However, it is important to remember that, under UCS-2, each character corresponds to two bytes instead of one. For this reason, you must be careful to maintain character integrity when using &osq.normal&csq. REXX functions to manipulate UCS-2 data. (The same caveat also applies when working with DBCS or MBCS codepage text.) .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=parameters.Common parameters :p.Various RxULS functions must manipulate Unicode text or convert text from one codepage to another. Many of these functions take some or all of the common parameters listed below. Rather than repeat this information in each function description, information about these parameters is described here. :ul compact. :li.:link reftype=hd res=2041.codepage:elink. :li.:link reftype=hd res=2042.subchar:elink. :li.:link reftype=hd res=2043.controls:elink. :li.:link reftype=hd res=2044.path:elink. :li.:link reftype=hd res=2045.locale:elink. :eul. .* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :h3 x=left y=bottom width=100% height=100% res=2041 id=parm_codepage.codepage :p.This parameter specifies an OS/2 codepage number. It must be a positive integer value; text aliases are not currently supported. Do not prefix the codepage number with 'IBM-' or any other string. :p.Any codepage supported by OS/2 may be used (in other words, you are not limited to the process codepage values defined in CONFIG.SYS). See :link reftype=hd refid=appa.Appendix A:elink. for a complete list of OS/2 codepages. .* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :h3 x=left y=bottom width=100% height=100% res=2042 id=parm_subchar.subchar :p.This parameter specifies the substitution character to be used when converting text to the target codepage. This is a two-letter hexadecimal value between 00 and FF which represents the character, in the target codepage, which will be used to represent substituted (i.e. unsupported) characters. :p.The default value depends on the codepage; for most single-byte PC codepages it is 0x7F (&house.). :p.This setting is not supported when the target codepage is a DBCS codepage, and the default substitution character is a double-byte character. The default character will always be used in that case. .* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :h3 x=left y=bottom width=100% height=100% res=2043 id=parm_controls.controls :p.This parameter is the control-byte mapping flag. :p.Byte values 0x00 through 19 and 0x7F have dual functions. Under the original ASCII specification, they represent control codes which modify the data stream (for instance, 0x0D is the &osq.newline&csq. character). However, in some contexts (especially graphical environments such as Presentation Manager), these byte values are often used to represent displayable characters instead. :p.The purpose of this parameter is to specify how these bytes should be interpreted during conversion from one codepage to another. Only the first character is significant, and (if specified) must be one of the following values&colon. :dl break=all. :dt.:hp2.D:ehp2.ATA :dd.Do not convert these byte values at all, but leave them unchanged in the output text. This is the default. :dt.:hp2.G:ehp2.LYPHS :dd.Assume these bytes represent displayable glyphs, and convert them according to codepage just like any other character. :dt.:hp2.C:ehp2.ONTROLS :dd.Assume these bytes represent control codes, and convert them using standard IBM control mapping. :dt.:hp2.L:ehp2.INEBREAKS :dd.Treat &osq.linebreak&csq. bytes (0x0D/carriage-return and 0x0A/linefeed) as control codes, but all others as displayable glyphs. :edl. .* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :h3 x=left y=bottom width=100% height=100% res=2044 id=parm_path.path :p.This parameter is the DBCS path conversion flag. It only applies to DBCS codepages, and indicates whether or not the text being converted should be assumed to contain a path specification. :p.Several Asian DBCS codepages which are otherwise ASCII-compatible replace the ASCII backslash character (0x5C) with an Asian currency symbol (yen, yuan, or won), and the ASCII tilde (0x7E) with an overline character. The purpose of this parameter is to control how these character values should be treated when converting to and from such codepages. :p.Only the first character is significant, and (if specified) must be one of the following values&colon. :dl break=fit. :dt.:hp2.Y:ehp2.ES :dd.Assume string may contain a path; convert 0x5C as the ASCII backslash, and 0x7E as the ASCII tilde. This is the default :dt.:hp2.N:ehp2.O :dd.Assume string doesn't contain a path; convert 0x5C as the halfwidth currency symbol, and 0x7E as the halfwidth overline. :edl. :p.In effect, when using :hp1.path:ehp1.=:hp2.Y:ehp2., 0x5C and 0x7E will be treated as the backslash and tilde (respectively) when converting :hp2.to:ehp2. other codepages. When converting :hp2.from:ehp2. other codepages, both the backslash and the currency symbol will become 0x5C, and both the tilde and the overline will become 0x7E. :p.Conversely, when using :hp1.path:ehp1.=:hp2.N:ehp2., 0x5C and 0x7E will be treated as the currency symbol and overline (respectively) when converting :hp2.to:ehp2. other codepages. When converting :hp2.from:ehp2. other codepages, the currency symbol will become 0x5C, and the overline will become 0x7E; the backslash and the tilde, however, will be treated as nonexistent characters, and replaced by substitution symbols. :nt.All the semantic character values affected by this setting (backslash, tilde, overline, and the various currency symbols) refer to the single-byte (&osq.halfwidth&csq.) forms only. DBCS codepages may contain double-byte (or &osq.fullwidth&csq.) forms of all these characters, which are not affected by the :hp1.path:ehp1. setting.:ent. :p. :p.:hp7.Example:ehp7. :p.As the implications of this parameter can be somewhat confusing, it is illustrated here with some examples. :p.As an example, the possible conversions for codepage 932 (Japanese) with both UCS-2 and codepage 850 (PC Latin-1) are shown in the tables below. :p. :p.:hp2.When :ehp2.:hp3.path:ehp3.:hp2.=Y:ehp2. :table cols='15 15 15 15 20' rules=vert. :row. :c.:hp5.From 932:ehp5. :c.:hp5.To/From UCS-2:ehp5. :c.:hp5.To 932:ehp5. :c.:hp5.To 850:ehp5. :c.:hp5.Treat As Character:ehp5. :row. :c.0x5C :c.U+005C :c.0x5C :c.0x5C :c.Backslash :row. :c.0x7E :c.U+007E :c.0x7E :c.0x7E :c.Tilde :row. :c.- :c.U+00A5 :c.0x5C :c.0xBE :c.Yen :row. :c.- :c.U+203E :c.0x7E :c.0xEE :c.Overline :etable. In this example, converting 0x5C from codepage 932 would cause it to become U+005C under UCS-2 (codepage 1200), or 0x5C (backslash) under codepage 850. Converting U+005C from UCS-2 back to codepage 932 would cause it to become 0x5C again. :p.However, converting U+00A5 from UCS-2 to codepage 932 would also produce the value 0x5C. It would become 0xBE (yen) if converting to codepage 850. .* When PATH=YES .* From 932 Treat As UCS-2 To 932 To 850 .* 0x5C HW backslash U+005C 0x5C 0x5C .* 0x7E HW tilde U+007E 0x7E 0x7E .* - HW yen U+00A5 0x5C 0xBE .* - HW overline U+203E 0x7E 0xEE :p. :p.:hp2.When :ehp2.:hp3.path:ehp3.:hp2.=N:ehp2. :table cols='15 15 15 15 20' rules=vert. :row. :c.:hp5.From 932:ehp5. :c.:hp5.To/From UCS-2:ehp5. :c.:hp5.To 932:ehp5. :c.:hp5.To 850:ehp5. :c.:hp5.Treat As Character:ehp5. :row. :c.- :c.U+005C :c.- :c.0x5C :c.Backslash :row. :c.- :c.U+007E :c.- :c.0x7E :c.Tilde :row. :c.0x5C :c.U+00A5 :c.0x5C :c.0xBE :c.Yen :row. :c.0x7E :c.U+203E :c.0x7E :c.0xEE :c.Overline :etable. In this example, converting 0x5C from codepage 932 would cause it to become U+00A5 (0x00A5) under UCS-2, or 0xBE (yen) under codepage 850. Converting U+00A5 from UCS-2 back to codepage 932 would cause it to become 0x5C again. :p.However, converting U+005C from UCS-2 to codepage 932 would produce a substitution symbol (indicating a non-existent character). It would become 0x5C (backslash) if converting to codepage 850. .* When PATH=NO .* Treat As To UCS-2 To 932 To 850 .* - HW backslash U+005C - 0x5C .* - HW tilde U+007E - 0x7E .* 0x5C HW yen U+00A5 0x5C 0xBE .* 0x7E HW overline U+203E 0x7E 0xEE .* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - :h3 x=left y=bottom width=100% height=100% res=2045 id=parm_locale.locale :p.This parameter is name of the locale whose attributes are being used. Locale names are usually of the form :hp3.xx_YY:ehp3., where :hp3.xx:ehp3. is a language and :hp3.YY:ehp3. is a country (e.g. &osq.:hp2.en_US:ehp2.&csq., &osq.:hp2.zh_TW:ehp2.&csq., &osq.:hp2.it_IT:ehp2.&csq., etc.) .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% res=2090.Error handling :p.All RxULS functions write error information to a global REXX variable, within the calling program, called :hp2.ULSERR:ehp2.. This variable will have the value &osq.0&csq. if the last RxULS function completed successfully. :p.Whenever an error occurs within a RxULS function, it will set the value of :hp2.ULSERR:ehp2. to a string of the form &osq.:hp3.x:ehp3.:hp2.&colon. :ehp2.:hp3.text:ehp3.&csq., where :hp1.x:ehp1. is an integer value, and :hp1.text:ehp1. is a short string that points to the specific error that occurred. (In most cases, :hp1.text:ehp1. will be the name of the internal function call that failed, and :hp1.x:ehp1. will be the return code from that function.) .****************************************************************************** :h1 x=left y=bottom width=100% height=100% id=functions.RxULS Functions .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulscontrol.Library control functions :p.:hp7.ULSLoadFuncs():ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSLoadFuncs()컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.ULSLoadFuncs registers all other RxULS functions. It takes no parameters and returns no value. :p. :p.:hp7.ULSDropFuncs():ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSDropFuncs()컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.ULSDropFuncs deregisters all RxULS functions (including itself). It takes no parameters and returns no value. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsconvertcodepage.ULSConvertCodepage :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSConvertCodepage( string 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴컴컴컴컴컴컫컴컴컴컴컴컴컴�&rahead. � � 읕 sourcecodepage 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � &rahead.컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � &rahead. 읕,컴쩡컴컴컴컴컴컴컴컴컫컴쩡컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 targetcodepage 켸 읕,컴쩡컴컴컴컴컴쩡컫컴컴컴컴컴컴컴컴컴컴컴&rahead. � � 읕 subchar 켸 읕,컴쩡컴컴컴컴컴컫컴컴&rahead. � � 읕 controls 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컫컴)컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컫컴컴컴컴컴컴컴컫켸 � � 읕,컴쩡컴컴컴컫켸 � � 읕 path 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Converts a string from one codepage to another. There is no upper limit on the length of the string. :p.If either the source or target codepage is not specified, the current process codepage is assumed. Therefore, if neither codepage parameter is specified, the string will be returned unchanged. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.string :dd.The string to be converted. This parameter is required. :dt.sourcecodepage :dd.The source :link reftype=hd refid=parm_codepage.codepage:elink.. This is the codepage in which :hp1.string:ehp1. is encoded (i.e. under which it would display correctly). If not specified, the default is the current process codepage. :dt.targetcodepage :dd.The target :link reftype=hd refid=parm_codepage.codepage:elink.. This is the codepage under which the returned string is to be encoded. If not specified, the default is the current process codepage. :dt.:link reftype=hd refid=parm_subchar.subchar:elink. :dd.The substitution character for the target codepage. :dt.:link reftype=hd refid=parm_controls.controls:elink. :dd.The control-byte mapping flag. :dt.:link reftype=hd refid=parm_path.path:elink. :dd.The DBCS path conversion flag. :edl. :p. :p.:hp7.Returns:ehp7. :p.The converted string. If an error occurs during conversion, an empty string ("") is returned and the global ULSERR variable will be set to a non-zero value. :p. :p.:hp7.Example:ehp7. :xmp. /* Input string (encoded for codepage 850) */ string = 'We had lunch at a caf� in Reykjav죏.' SAY '[Codepage 850]&colon.' string /* Convert it to codepage 862, using '?' (0x3F) for unsupported characters */ string2 = ULSConvertCodepage( string, 850, 862, '3f') IF ULSERR \= '0' THEN SAY ULSERR ELSE SAY '[Codepage 862]&colon.' string2 /* Convert it to codepage 1200 (UCS-2) */ string3 = ULSConvertCodepage( string, 850, 1200 ) IF ULSERR \= '0' THEN SAY ULSERR ELSE SAY '[UCS-2]&colon. ' string3 :exmp. :p.The following is a sample of output from the above example&colon. :xmp. [Codepage 850]&colon. We had lunch at a caf� in Reykjav죏. [Codepage 862]&colon. We had lunch at a caf? in Reykjav?k. [UCS-2]&colon. W e h a d l u n c h a t a c a f � i n R e y k j a v � k . :exmp. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulscountrylocale.ULSCountryLocale :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSCountryLocale( number )컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Returns the name of the system locale that corresponds to the specified numerical locale constant. :p.The Universal Language Support API uses a one-to-three digit number to uniquely identify each predefined country locale. This function allows you to query the name of the locale that corresponds to a particular number. A list of known numbers is provided below. :nt.This number is :hp2.not:ehp2. the same as the country code (as used by :hp2.DosQueryDBCSEnv:ehp2. and other functions), although the values do overlap to some extent. In fact, these numbers do not appear to be used by any other ULS or OS/2 function. Consequently, this function may not have much practical use, but it has been included in the REXX interface for the sake of completeness.:ent. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.number :dd.The requested numeric locale code (required). :edl. :p. :p.:hp7.Returns:ehp7. :p.The name of the locale, encoded in the currently-active codepage. :p. :p.:hp7.Locale Numbers:ehp7. :p.A list of known numbers is included below, together with the OS/2 language ID that most closely corresponds. (Thanks to Peter Koller for compiling these.) A '*' indicates that the locale name is not recognized by OS/2 functions outside the Universal Language Support API. :xmp. ULS LANGID (approx) NAME DESCRIPTION 0 81 ja_JP Japan (Japanese) 1 1 en_US United States (English) 2 2 fr_CA Canada (French) 3 3 es_LA Latin America (Spanish) 7 7 ru_RU Russia (Russian) 20 785 ar_EG Egypt (Arabic) * 27 27 en_ZA South Africa (English) 30 358 fi_FI_E Finland (Finnish) 31 31 nl_NL Netherlands (Dutch) 32 32 en_BE Belgium (English) 33 33 fr_FR France (French) 34 34 es_ES Spain (Spanish) 36 36 hu_HU Hungary (Hungarian) 39 39 it_IT Italy (Italian) 40 40 ro_RO Romania (Romanian) 41 41 fr_CH Switzerland (French) 42 421 cs_CZ Czech Republic (Czech) 43 43 de_AT Austria (German) 44 44 en_GB United Kingdom (English) 45 45 da_DK Denmark (Danish) 46 46 sv_SE Sweden (Swedish) 47 47 no_NO Norway (Norwegian) 48 48 pl_PL Poland (Polish) 49 49 de_DE Germany (German) 51 34 es_PE Peru (Spanish) * 52 34 es_MX Mexico (Spanish) * 54 34 es_AR Argentina (Spanish) * 55 55 pt_BR Brazil (Portuguese) 56 34 es_CL Chile (Spanish) * 57 34 es_CO Colombia (Spanish) * 58 34 es_VE Venezuela (Spanish) * 61 61 en_AU Australia (English) 64 64 en_NZ New Zealand (English) 65 86 zh_SG Singapore (Chinese) * 66 66 th_TH Thailand (Thai) 81 49 de_LI Liechtenstein (German) * 82 66 in_ID Indonesia (Indonesian) * 84 66 vi_VN Vietnam (Vietnamese) * 86 86 zh_CN China (Simplified Chinese) 88 88 zh_TW Taiwan (Traditional Chinese) 90 90 tr_TR Turkey (Turkish) 99 1 univ Universal * 212 785 ar_MA Morocco (Arabic) * 213 785 ar_DZ Algeria (Arabic) * 216 785 ar_TN Tunisia (Arabic) * 351 351 pt_PT Portugal (Portuguese) 352 33 fr_LU Luxembourg (French) * 353 353 en_IE Ireland (English) 354 354 is_IS Iceland (Icelandic) 355 355 sq_AL Albania (Albanian) 358 46 sv_FI Finland (Swedish) * 359 359 bg_BG Bulgaria (Bulgarian) 370 370 lt_LT Lithuania (Lithuanian) 371 371 lv_LV Latvia (Latvian) 372 372 et_EE Estonia (Estonian) 375 7 be_BY Belarus (Belarussian) * 380 7 uk_UA Ukraine (Ukrainian) * 381 381 hr_SP Serbia (Croatian) 385 385 hr_HR Croatia (Croatian) 386 386 sl_SI Slovenia (Slovenian) 387 387 sh_BA Bosnia (Serbo-Croatian) 389 389 mk_MK Macedonia (Macedonian) 502 34 es_GT Guatemala (Spanish) * 503 34 es_SV El Salvador (Spanish) * 504 34 es_HN Honduras (Spanish) * 505 34 es_NI Nicaragua (Spanish) * 506 34 es_CR Costa Rica (Spanish) * 507 34 es_PA Panama (Spanish) * 591 34 es_BO Bolivia (Spanish) * 593 34 es_EC Ecuador (Spanish) * 595 34 es_PY Paraguay (Spanish) * 598 34 es_UY Uruguay (Spanish) * 785 785 ar_AA Arabic Speaking (Arabic) 852 86 zh_HK Hong Kong (Traditional Chinese) * 961 785 ar_LB Lebanon (Arabic) * 962 785 ar_JO Jordan (Arabic) * 963 785 ar_SY Syria (Arabic) * 965 785 ar_KW Kuwait (Arabic) * 966 785 ar_SA Saudi Arabia (Arabic) * 967 785 ar_YE Yemen (Arabic) * 968 785 ar_OM Oman (Arabic) * 971 785 ar_AE United Arab Emirates (Arabic) * 972 30 el_GR_E Greece (Greek) * 973 785 ar_BH Bahrain (Arabic) * 974 785 ar_QA Qatar (Arabic) * 981 1 fa_IR Iran (Farsi) * :exmp. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsfindattr.ULSFindAttr :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSFindAttr( string 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴&rahead. � � 읕,컴쩡컴컴컴컴컴컴쩡컫컴컴컴컴컴컴컴컴컴컴컴컴&rahead. � � 읕 attribute 켸 읕,컴쩡컴컴컴컴쩡컴컴컴컴&rahead. � � 읕 start 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � &rahead.컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴쩡컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 max 켸 읕,컴쩡컴컴컴컫컴쩡컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 flag 켸 읕,컴쩡컴컴컴컴컴컫컴컴컴컴컴컴컴컴컴&rahead. � � 읕 codepage 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컫컴)컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컫컴컴컴컴컴컴컴컴컫켸 � � 읕,컴쩡컴컴컴컴컫켸 � � 읕 locale 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Searches a string for the first character that fits the specified attribute criterion. :p. :p.:hp7.Parameters:ehp7. :nt.The :hp1.start:ehp1. and :hp1.max:ehp1. parameters (below) both specify a number of characters, not a number of bytes. In the case of MBCS codepages, these may not be the same thing.:ent. :dl break=fit tsize=12. :dt.string :dd.The input string to be searched. :dt.attribute :dd.The name of the attribute to search for. See the function description for :link reftype=hd refid=ulsqueryattr.ULSQueryAttr:elink. for a list of valid attribute names. :dt.start :dd.The character position within :hp1.string:ehp1. to start searching from. Must fall between 1 and the string length (in characters). Defaults to 1 (the start of the string) if not specified. :dt.max :dd.The maximum number of characters to search. Defaults to the length of :hp1.string:ehp1. (in characters) if not specified. :dt.flag :dd.Indicates whether to perform a positive search (as opposed to a negative search). Only the first character is significant, and (if specified) must be one of the following values&colon. :dl compact tsize=4. :dt.T :dd.True&colon. find the first character that matches the specified attribute (positive search). This is the default. :dt.F :dd.False&colon. find the first character that does not match the specified attribute (negative search). :edl. :dt.:link reftype=hd refid=parm_codepage.codepage:elink. :dd.The source codepage. This is the codepage in which :hp1.string:ehp1. is encoded (i.e. under which it would display correctly). If not specified, the current process codepage is assumed. :dt.:link reftype=hd refid=parm_locale.locale:elink. :dd.The locale whose text-attribute rules are to be used. If not specified, the default is to use the current locale as defined by the LANG and LC_* environment variables. :edl. :p. :p.:hp7.Returns:ehp7. :p.The character position of the first match, or 0 if no matching characters were found. If an error occurs, an empty string ("") is returned and the global ULSERR variable will be set to a non-zero value. :p. :p.:hp7.Example:ehp7. :xmp. /* Input string (encoded for codepage 850) */ string = 'We had lunch at a caf� in Reykjav죏.' SAY string /* Search string for the first non-ASCII character */ c = ULSFindAttr( string, 'ascii',,,'F') IF ULSERR \= '0' THEN SAY ULSERR ELSE SAY 'The first non-ASCII character is at position&colon.' c :exmp. :p.The following is a sample of output from the above example&colon. :xmp. We had lunch at a caf� in Reykjav죏. The first non-ASCII character is at position&colon. 22 :exmp. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsformattime.ULSFormatTime :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSFormatTime( seconds 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴컴컫컴쩡컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 format 켸 읕,컴쩡컴컴컴쩡컴컴컴컴컴&rahead. � � 읕 utc 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � &rahead.컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴컴컫컴쩡컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 locale 켸 읕,컴쩡컴컴컴컴컴컫컴쩡컴컴컴컴컴컴컴컴컴컴컴컴컴컴&rahead. � � 읕 codepage 켸 읕,컴쩡컴컴컴컴컴쩡컴컴컴컴컴�&rahead. � � 읕 subchar 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컫컴)컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컫켸 � � &rahead.컫컴컴컴컴컴컴컴컴컴컫켸 � � 읕,컴쩡컴컴컴컴컴컫켸 � � 읕 controls 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Converts an absolute time value into a formatted date and time string. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.seconds :dd.The absolute time value to be formatted. This is a positive integer representing a number of seconds since the Epoch (0&colon.00&colon.00 on January 1, 1970) in Coordinated Universal Time (UTC). :dt.format :dd.A string which describes the format of the time string to be returned. This string takes the same syntax as the ULS function :hp2.UniStrftime:ehp2., and may contain a mixture of text and conversion specifiers (listed below). The default format string is "%c", which indicates the locale's standard date and time string. :p.The possible conversion specifiers are listed below. Any text in the format string which does not correspond to a conversion specifier will simply be copied to output string. :p.:hp2.Standard conversion specifiers&colon.:ehp2. :dl compact tsize=8. :dt.%a :dd.The locale's abbreviated weekday name (e.g. 'Sun'). :dt.%A :dd.The locale's full weekday name (e.g. 'Sunday'). :dt.%b :dd.The locale's abbreviated month name (e.g. 'Jan'). :dt.%B :dd.The locale's full month name (e.g. 'January'). :dt.%c :dd.The locale's default date and time string. :dt.%C :dd.The century as a decimal number (00-99). :dt.%d :dd.The day of the month as a two-digit decimal number (01-31). :dt.%D :dd.The date in %m/%d/%y format (e.g. '01/31/94'). :dt.%e :dd.The day of the month as a decimal number ( 1-31). A single digit will be preceded by a space. :dt.%h :dd.The same as %b. :dt.%H :dd.The 24-hour-clock hour as a decimal number (00-23). :dt.%I :dd.The 12-hour-clock hour as a decimal number (01-12). :dt.%j :dd.The day of the year as a three-digit decimal number (001-366). :dt.%m :dd.The month of the year as a two-digit decimal number (01-12). :dt.%M :dd.The minute of the hour as a decimal number (00-59). :dt.%n :dd.A newline character. :dt.%p :dd.The locale's AM or PM string. :dt.%r :dd.The same as %I&colon.%M&colon.%S%p. :dt.%R :dd.24-hour-clock time in the format %H&colon.%M. :dt.%S :dd.The second of the minute as a decimal number (00-61). :dt.%t :dd.A tab character. :dt.%T :dd.The same as %H&colon.%M&colon.%S. :dt.%u :dd.The day of the week as a decimal number (1-7), where 1 represents Monday. :dt.%U :dd.The week of the year as a two-digit decimal number (00-53), where the week is considered to start on Sunday. :dt.%V :dd.The week of the year as a two-digit decimal number (01-53), where the week is considered to start on Monday. If the week containing 1 January has four or more days in the new year, then it is considered week 1; otherwise, it is week 53 of the previous year, and the next week is week 1. :dt.%w :dd.The day of the week as a decimal number (0-6), where 0 represents Sunday. :dt.%W :dd.The week of the year as a two-digit decimal number (00-53), where the week is considered to start on Monday. All days in a new year preceding the first Sunday are considered to be week 0. :dt.%x :dd.The locale's default date-only representation. :dt.%X :dd.The locale's default time-only representation. :dt.%y :dd.The year of the century (00-99). :dt.%Y :dd.The year with century as a decimal number (e.g. '1994'). :dt.%Z :dd.The time-zone name or abbreviation if one can be determined (e.g. 'EST'), or nothing if the time zone information does not exist. :dt.%% :dd.A % (percent) sign. :edl. :p.:hp2.Conversion specifiers for alternate locale items&colon.:ehp2. :dl compact tsize=8. :dt.%Ec :dd.Locale's alternative date and time string. :dt.%EC :dd.The base year or era in the locale's alternative representation. :dt.%Ex :dd.The locale's alternative date representation. :dt.%EX :dd.The locale's alternative time representation. :dt.%Ey :dd.The year offset from %EC in the locale's alternative representation. :dt.%EY :dd.The full alternative year representation. :dt.%Od :dd.The day of the month using the locale's alternative numeric symbols; filled as needed with leading zeros if there is any alternative symbol for zero, otherwise with leading spaces. :dt.%Oe :dd.The day of the month, using the locale's alternative numeric symbols, filled as needed with leading spaces. :dt.%OH :dd.The hour (24-hour clock) using the locale's alternative numeric symbols. :dt.%OI :dd.The hour (12-hour clock) using the locale's alternative numeric symbols. :dt.%Om :dd.The month using the locale's alternative numeric symbols. :dt.%OM :dd.The minutes using the locale's alternative numeric symbols. :dt.%OS :dd.The seconds using the locale's alternative numeric symbols. :dt.%Ou :dd.The weekday (1-7 where Monday=1) using the locale's alternative numeric symbols. :dt.%OU :dd.The week number of the year (00-53 where Sunday is the first day of the week) using the locale's alternative numeric symbols. :dt.%OV :dd.The week number of the year (01-53 where Sunday is the first day of the week) using the locale's alternative numeric symbols. :dt.%Ow :dd.The number of the weekday (0-6 where Sunday=0) using the locale's alternative numeric symbols. :dt.%OW :dd.The week number of the year (01-53 where Monday is the first day of the week) using the locale's alternative numeric symbols. :dt.%Oy :dd.The year (offset from %C) in the locale's alternative representation and using the locale's alternative numeric symbols. :edl. :dt.utc :dd.Indicates whether the returned time will be given in Coordinated Universal Time (UTC), or converted to local time (adjusting for summer time, if applicable). Only the first character is significant, and (if specified) must be one of the following values: :dl compact tsize=4. :dt.Y :dd.Return the time in UTC. :dt.N :dd.Convert to the local timezone; this is the default. :edl. :nt.If local time is to be returned, the value for :hp1.seconds:ehp1. must not convert to a time prior to 0&colon.00&colon.00 on January 1, 1970; otherwise, an empty string will be returned, and ULSERR will indicate an error in :hp1.gmtime:ehp1..:ent. :dt.:link reftype=hd refid=parm_locale.locale:elink. :dd.The name of the locale whose language and localization rules are to be used in formatting the time string. The default is to use the current locale as defined by the LANG and LC_* environment variables. :dt.:link reftype=hd refid=parm_codepage.codepage:elink. :dd.The target codepage. This is the codepage under which the returned string is to be encoded. The default is the current process codepage. :dt.:link reftype=hd refid=parm_subchar.subchar:elink. :dd.The substitution character for the target codepage. :dt.:link reftype=hd refid=parm_controls.controls:elink. :dd.The control-byte mapping flag. :edl. :p. :p.:hp7.Returns:ehp7. :p.The formatted time string. If an error occurs, an empty string ("") is returned, and the global ULSERR variable will be set to a non-zero value. :p. :p.:hp7.Example:ehp7. :p.(In the following example, the local time zone is assumed to be EST5EDT.) :xmp. /* Epoch time in seconds. */ epochtime = 1234567890 /* Convert to local time, using the current locale. */ timestr = ULSFormatTime( epochtime ) SAY timestr /* Same, except use nl_NL (Dutch) localization conventions. */ timestr = ULSFormatTime( epochtime,, 'N', 'nl_NL') SAY timestr /* Same again, but this time using ja_JP (Japanese) localization * conventions. */ timestr = ULSFormatTime( epochtime,, 'N', 'ja_JP',, '3F', 'G') SAY timestr /* The previous three calls all convert to the (same) local time zone. * Now we get the time in Coordinated Universal Time (UTC). */ timestr = ULSFormatTime( epochtime, '%Y-%m-%d %X', 'Y', 'C') SAY 'The Coordinated Universal Time is&colon.' timestr :exmp. :p.The following is a sample of output from the above example&colon. :xmp. Fri Feb 13 18&colon.31&colon.30 EST 2009 vr feb 13 18&colon.31&colon.30 2009 2009?02?13? 18?31?30? The Coordinated Universal Time is&colon. 2009-02-13 23&colon.31&colon.30 :exmp. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsgetlocales.ULSGetLocales :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSGetLocales(컫컴컴컴컴쩡, stem )컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � 읕 flag 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Gets the list of locales known to the system. :p.Locales may be either system locales (standardized locales defined by OS/2) or user locales (instantiated locale instances which appear in the Country Palette or "Locale" object). :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.flag :dd.Indicates which type of locales to list&colon. system, user, or both. Only the first character is significant, and (if specified) must be one of the following values&colon. :dl compact tsize=4. :dt.B :dd.List both user and system locales; this is the default. :dt.S :dd.List system locales only. :dt.U :dd.List user locales only. :edl. :dt.stem :dd.The name of a stem variable which will be populated with the list of locales. :hp1.stem:ehp1..0 will contain an integer :hp1.n:ehp1., indicating the number of locales found; and :hp1.stem:ehp1..1 through :hp1.stem:ehp1..:hp1.n:ehp1. will each contain a single locale name. :edl. :p. :p.:hp7.Returns:ehp7. :p.The number of locales returned (the same as :hp1.stem:ehp1..0). If an error occurs, an empty string ("") is returned and the global ULSERR variable will be set to a non-zero value. :p. :p.:hp7.Example:ehp7. :xmp. /* Get a list of all user locales defined on the system */ CALL ULSGetLocales 'U', 'locales.' SAY 'There are' locales.0 'user locales defined&colon.' DO i = 1 TO locales.0 SAY ' ->.' locales.i END :exmp. :p.The following is a sample of output from the above example&colon. :xmp. There are 2 user locales defined&colon. ->. en_CA ->. ja_JP :exmp. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsgetunicodeclipboard.ULSGetUnicodeClipboard :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSGetUnicodeClipboard(컫컴컴컴컴컴컴컴컴컴쩡컫컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 targetcodepage 켸 읕,컴쩡컴컴컴컴컴쩡컴�&rahead. � � 읕 subchar 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴쩡�)컴컴컴컴컴컴컴컴컴컴컴컴&rahead.&lahead. � � &rahead.컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴쩡� � � 읕,컴쩡컴컴컴컴컴컫컴쩡컴컴컴컴컴컴컴쩡� � � 읕 controls 켸 읕,컴쩡컴컴컴컫켸 � � 읕 path 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Retrieves Unicode text from the clipboard, if available. :p.Unicode text is read using the "text/unicode" clipboard data format, which is used by a number of applications, including the Mozilla family of products. It is also supported by recent versions of the third-party UClip library. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.targetcodepage :dd.The target :link reftype=hd refid=parm_codepage.codepage:elink.. This is the codepage under which the returned string is to be encoded. If not specified, the default is the current process codepage. :dt.:link reftype=hd refid=parm_subchar.subchar:elink. :dd.The substitution character for the target codepage. :dt.:link reftype=hd refid=parm_controls.controls:elink. :dd.The control-byte mapping flag. :dt.:link reftype=hd refid=parm_path.path:elink. :dd.The DBCS path conversion flag. :edl. :p. :p.:hp7.Returns:ehp7. :p.The Unicode text retrieved from the clipboard, as converted into the target codepage. If no Unicode text could be retrieved, the empty string ("") is returned. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsputunicodeclipboard.ULSPutUnicodeClipboard :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSPutUnicodeClipboard( string 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴컴컴컴컴컴컫컴컴컴컴컴�&rahead. � � 읕 sourcecodepage 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴쩡�)컴컴컴컴컴컴컴컴컴컴컴컴&rahead.&lahead. � � &rahead.컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴쩡� � � 읕,컴쩡컴컴컴컴컴컫컴쩡컴컴컴컴컴컴컴쩡� � � 읕 controls 켸 읕,컴쩡컴컴컴컫켸 � � 읕 path 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Converts the specified text into Unicode (UCS-2) and places it into the clipboard in the "text/unicode" format. This format is used by a number of applications, including the Mozilla family of products. (It is also supported by recent versions of the third-party UClip library.) :p.The text is :hp2.not:ehp2. copied in plain text format as well; if the application desires this done, it must do so itself using separate means. :nt.This function does not clear the clipboard of other formats first. That, too, is up to the application to do if it is deemed necessary.:ent. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.string :dd.The string to be placed on the clipboard. This parameter is required. :dt.sourcecodepage :dd.The source :link reftype=hd refid=parm_codepage.codepage:elink.. This is the codepage in which :hp1.string:ehp1. is encoded (i.e. under which it would display correctly). If not specified, the default is the current process codepage. :dt.:link reftype=hd refid=parm_codepage.controls:elink. :dd.The control-byte mapping flag. :dt.:link reftype=hd refid=parm_path.path:elink. :dd.The DBCS path conversion flag. :edl. :p. :p.:hp7.Returns:ehp7. :p.The empty string (""). .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsqueryattr.ULSQueryAttr :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSQueryAttr( char, attribute 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴&rahead. � � 읕,컴쩡컴컴컴컴컴컫컴컴컴컴컴컴컴컴컴&rahead. � � 읕 codepage 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컫컴)컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � &rahead.컫컴컴컴컴컴컴컴컴컫켸 � � 읕,컴쩡컴컴컴컴컫켸 � � 읕 locale 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Queries whether or not a character has the specified character attribute. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.char :dd.The character to query. This must be a valid character for the specified codepage. This may be a multi-byte string if the codepage allows multiple bytes per character; however, if the string contains more than one valid character, only the first one will be considered (the remainder are ignored). :dt.attribute :dd.The name of the attribute to check for. This must be one of the following. (Attributes whose names start with "_" represent Unicode character sets. Those starting with "#" are BIDI attributes.) The name is not case sensitive. :dl compact tsize=12. :dt.alnum :dd.Alphabetic and numeric characters :dt.alpha :dd.Letters and linguistic marks :dt.ascii :dd.Standard ASCII character :dt.blank :dd.Space and tab characters :dt.cntrl :dd.Control and format characters :dt.digit :dd.Digits 0 through 9 :dt.graph :dd.All except controls and space :dt.lower :dd.Lower case alphabetic character :dt.number :dd.Integral numbers between 0 and 9 :dt.print :dd.Everything except control characters :dt.punct :dd.Punctuation marks :dt.space :dd.Whitespace and line-breaking characters :dt.symbol :dd.Symbol :dt.upper :dd.Upper case alphabetic character :dt.xdigit :dd.Hexadecimal digits (0-9, a-f, A-F) :dt.diacritic :dd.Diacritic mark :dt.fullwidth :dd.Full-width variant :dt.halfwidth :dd.Half-width variant :dt.hiragana :dd.Hiragana character :dt.ideograph :dd.Kanji/Han character :dt.kashida :dd.Arabic tatweel (elongation character) :dt.katakana :dd.Katakana character :dt.nonspacing :dd.Non-spacing mark :dt.nsdiacritic :dd.Non-spacing diacritic :dt.nsvowel :dd.Non-spacing vowel :dt.vowelmark :dd.Vowel mark :dt._apl :dd.APL character :dt._arabic :dd.Arabic character :dt._arrow :dd.Arrow character :dt._bengali :dd.Bengali character :dt._bopomofo :dd.Bopomofo character :dt._box :dd.Box or line drawing character :dt._currency :dd.Currency Symbol :dt._cyrillic :dd.Cyrillic character :dt._dash :dd.Dash character :dt._devanagari :dd.Devanagari character :dt._dingbat :dd.Dingbat :dt._fraction :dd.Fraction value :dt._greek :dd.Greek character :dt._gujarati :dd.Gujarati character :dt._gurmukhi :dd.Gurmukhi character :dt._hanguel :dd.Hangul Jamo character :dt._hebrew :dd.Hebrew character :dt._hiragana :dd.Hiragana character set :dt._katakana :dd.Katakana character set :dt._lao :dd.Laotian character :dt._latin :dd.Latin character :dt._linesep :dd.Line separator :dt._math :dd.Math symbol :dt._punctstart :dd.Punctuation start :dt._punctend :dd.Punctuation end :dt._tamil :dd.Tamil character :dt._telegu :dd.Telegu character :dt._thai :dd.Thai character :dt._userdef :dd.User defined character :dt.#arabicnum :dd.Arabic numbers :dt.#blocksep :dd.Block separator :dt.#commonsep :dd.Common separator :dt.#euronum :dd.European number :dt.#eurosep :dd.European separator :dt.#euroterm :dd.European terminator :dt.#left :dd.Left to right text orientation :dt.#mirrored :dd.Symmetrical text orientation :dt.#neutral :dd.Other neutral :dt.#right :dd.Right to left text orientation :dt.#whitespace :dd.Whitespace :edl. :dt.:link reftype=hd refid=parm_codepage.codepage:elink. :dd.The source codepage. This is the codepage in which :hp1.string:ehp1. is encoded (i.e. under which it would display correctly). If not specified, the current process codepage is assumed. :dt.:link reftype=hd refid=parm_locale.locale:elink. :dd.The name of the locale whose text-attribute rules are to be used. The default is to use the current locale as defined by the LANG and LC_* environment variables. :edl. :p. :p.:hp7.Returns:ehp7. :p.This function returns 1 if the character has the specified attribute, or 0 if it does not. If an error occurs during the query operation, an empty string ("") is returned and the global ULSERR variable will be set to a non-zero value. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsquerylocaleitem.ULSQueryLocaleItem :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSQueryLocaleItem( item 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴컴컫컴쩡컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕 locale 켸 읕,컴쩡컴컴컴컴컴컫컴컴&rahead. � � 읕 codepage 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컴컴쩡�)컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴&rahead.&lahead. � � &rahead.컴컴컴컴컴컴컴컴컴컴컴쩡� � � &rahead.컫컴컴컴컴컴컴컴컴컴쩡� � � 읕,컴쩡컴컴컴컴컴쩡� � � 읕 subchar 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Queries the value of the specified locale item. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.item :dd.The locale item to be queried. The available locale items are listed below. The item can be specified by name or number; names, if used, are not case-sensitive. :xmp. NAME NUMBER DESCRIPTION sDateTime 1 Date and time format string sShortDate 2 Short date format sTimeFormat 3 Time format string s1159 4 AM string s2359 5 PM string sAbbrevDayName7 6 Abbreviation of day 7 (Sun) sAbbrevDayName1 7 Abbreviation of day 1 (Mon) sAbbrevDayName2 8 Abbreviation of day 2 (Tue) sAbbrevDayName3 9 Abbreviation of day 3 (Wed) sAbbrevDayName4 10 Abbreviation of day 4 (Thu) sAbbrevDayName5 11 Abbreviation of day 5 (Fri) sAbbrevDayName6 12 Abbreviation of day 6 (Sat) sDayName7 13 Name of day of week 7 (Sun) sDayName1 14 Name of day of week 1 (Mon) sDayName2 15 Name of day of week 2 (Tue) sDayName3 16 Name of day of week 3 (Wed) sDayName4 17 Name of day of week 4 (Thu) sDayName5 18 Name of day of week 5 (Fri) sDayName6 19 Name of day of week 6 (Sat) sAbbrevMonthName1 20 Abbreviation of month 1 sAbbrevMonthName2 21 Abbreviation of month 2 sAbbrevMonthName3 22 Abbreviation of month 3 sAbbrevMonthName4 23 Abbreviation of month 4 sAbbrevMonthName5 24 Abbreviation of month 5 sAbbrevMonthName6 25 Abbreviation of month 6 sAbbrevMonthName7 26 Abbreviation of month 7 sAbbrevMonthName8 27 Abbreviation of month 8 sAbbrevMonthName9 28 Abbreviation of month 9 sAbbrevMonthName10 29 Abbreviation of month 10 sAbbrevMonthName11 30 Abbreviation of month 11 sAbbrevMonthName12 31 Abbreviation of month 12 sMonthName1 32 Name of month 1 sMonthName2 33 Name of month 2 sMonthName3 34 Name of month 3 sMonthName4 35 Name of month 4 sMonthName5 36 Name of month 5 sMonthName6 37 Name of month 6 sMonthName7 38 Name of month 7 sMonthName8 39 Name of month 8 sMonthName9 40 Name of month 9 sMonthName10 41 Name of month 10 sMonthName11 42 Name of month 11 sMonthName12 43 Name of month 12 sDecimal 44 Decimal point sThousand 45 Triad separator sYesString 46 Yes string sNoString 47 No string sCurrency 48 Currency symbol sCodeSet 49 Locale codeset xLocaleToken 50 IBM Locale Token xWinLocale 51 Win32 Locale ID iLocaleResnum 52 Resource number for description sNativeDigits 53 String of native digits iMaxItem 54 Maximum item number sTimeMark 55 Time mark (am/pm) format sEra 56 Era definition sAltShortDate 57 Alternate short date format string sAltDateTime 58 Alternate date and time format sAltTimeFormat 59 Alternate time format sAltDigits 60 XPG4 alternate digits sYesExpr 61 XPG4 Yes expression sNoExpr 62 XPG4 No expression sDate 63 Short date separator sTime 64 Time separator sList 65 List separator sMonDecimalSep 66 Monetary currency separator sMonThousandSep 67 Monetary triad separator sGrouping 68 Grouping of digits sMonGrouping 69 Monetary groupings iMeasure 70 Measurement (Metric, British) iPaper 71 Normal paper size iDigits 72 Digits to right of decimal iTime 73 Clock format iDate 74 Format of short date iCurrency 75 Format of currency iCurrDigits 76 Digits to right for currency iLzero 77 Leading zero used iNegNumber 78 Format of negative number iLDate 79 Format of long date iCalendarType 80 Type of default calendar iFirstDayOfWeek 81 First day of week (0=Mon) iFirstWeekOfYear 82 First week of year iNegCurr 83 Format of negative currency iTLzero 84 Leading zero on time iTimePrefix 85 AM/PM preceeds time iOptionalCalendar 86 Alternate calendar type sIntlSymbol 87 International currency symbol sAbbrevLangName 88 Windows language abbreviation sCollate 89 Collation table iUpperType 90 Upper case algorithm iUpperMissing 91 Action for missing upper case sPositiveSign 92 Positive sign sNegativeSign 93 Negative sign sLeftNegative 94 Left paren for negative sRightNegative 95 Right paren for negative sLongDate 96 Long date formatting string sAltLongDate 97 Alternate long date format string sMonthName13 98 Name of month 13 sAbbrevMonthName13 99 Abbreviation of month 13 sName 100 OS/2 locale name sLanguageID 101 Abbreviation for language (ISO) sCountryID 102 Abbreviation for country (ISO) sEngLanguage 103 English name of Language sLanguage 104 Native name of language sEngCountry 105 English name of country sCountry 106 Localized country name sNativeCtryName 107 Name of country in native language iCountry 108 Country code sISOCodepage 109 ISO codepage name iAnsiCodepage 110 Windows codepage iCodepage 111 OS/2 primary codepage iAltCodepage 112 OS/2 alternate codepage iMacCodepage 113 Mac codepage iEbcdicCodepage 114 Ebcdic codepage sOtherCodepages 115 Other ASCII codepages sSetCodepage 116 Codepage to set on activation sKeyboard 117 Primary keyboard name sAltKeyboard 118 Alternate keyboard name sSetKeyboard 119 Keyboard to set on activation sDebit 120 Debit string sCredit 121 Credit string sLatin1Locale 122 Locale for Latin 1 names wTimeFormat 123 Win32 Time format wShortDate 124 Win32 Date format wLongDate 125 Win32 Long date format jISO3CountryName 126 Java abbreviation for country (ISO-3) jPercentPattern 127 Java percent pattern jPercentSign 128 Java percent symbol jExponent 129 Java exponential symbol jFullTimeFormat 130 Java full time format jLongTimeFormat 131 Java long time format jShortTimeFormat 132 Java short time format jFullDateFormat 133 Java full date format jMediumDateFormat 134 Java medium date format jDateTimePattern 135 Java date time format pattern jEraStrings 136 Java era strings :exmp. :dt.:link reftype=hd refid=parm_locale.locale:elink. :dd.The name of the locale whose values are being queried. The default is to use the current locale as defined by the LANG and LC_* environment variables. :dt.:link reftype=hd refid=parm_codepage.codepage:elink. :dd.The codepage into which the returned value will be converted. (Locale item values are stored internally as Unicode UCS-2 text. To return the value in UCS-2, specify codepage 1200.) :dt.:link reftype=hd refid=parm_subchar.subchar:elink. :dd.The substitution character for the target codepage. :edl. :p. :p.:hp7.Returns:ehp7. :p.The value of the specified locale item, as converted into the requested codepage. :p. :p.:hp7.Example:ehp7. :xmp. /* Query the name of the language for locale 'es_AR' (Argentina) * in both English and the localized language itself. */ englang = ULSQueryLocaleItem('sEngLanguage', 'es_AR', 850 ) IF ULSERR \= '0' THEN DO SAY ULSERR RETURN END natlang = ULSQueryLocaleItem('sLanguage', 'es_AR', 850 ) IF ULSERR \= '0' THEN DO SAY ULSERR RETURN END SAY 'The default language for locale es_AR is "'englang'" ("'natlang'")' :exmp. :p.The following is a sample of output from the above example&colon. :xmp. The default language for locale es_AR is "Spanish" ("Espa&nt.ol") :exmp. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulstransform.ULSTransform :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSTransform( string, transformation 컫컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead. � � 읕,컴쩡컴컴컴컴컴컫컴컴컴컴컴�&rahead. � � 읕 codepage 켸 � � � � &rahead.컴컴컴컴컴컴컴컴컴컴컫컴)컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � &rahead.컫컴컴컴컴컴컴컴컴컫켸 � � 읕,컴쩡컴컴컴컴컫켸 � � 읕 locale 켸 � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Transforms a string according to one of the predefined transformation types. The effect of this transformation may vary by locale. :p. :p.:hp7.Parameters:ehp7. :dl break=fit tsize=12. :dt.string :dd.The string to be converted (required). :dt.xform :dd.The name of the transformation to apply (required). This must be one of the following. The name is not case sensitive. :dl tsize=12 break=fit. :dt.lower :dd.Transform so that all text is lowercase. Characters without lowercase forms (as defined by the locale) are left unchanged. :dt.upper :dd.Transform so that all text is uppercase. Characters without uppercase forms (as defined by the locale) are left unchanged. :dt.compose :dd.Transform so that all diacritical (e.g. accented) characters are represented using fully-composed forms (a single code element represents the combined character). :dt.decompose :dd.Transform so that all diacritical characters are represented using decomposed forms (separate code elements are used to represent the base character and the diacritical mark). :dt.hiragana :dd.Transform so that all Japanese phonetic characters use the Hiragana character set. :dt.katakana :dd.Transform so that all Japanese phonetic characters use the full-width Katakana character set. :dt.kana :dd.Transform so that all Japanese phonetic characters use the half-width Katakana character set. :edl. :dt.:link reftype=hd refid=parm_codepage.codepage:elink. :dd.The source codepage. This is the codepage with which :hp1.string:ehp1. is encoded, and with which the returned string will also be encoded. The default is the current process codepage. :dt.:link reftype=hd refid=parm_locale.locale:elink. :dd.The name of the locale whose transformation rules are to be used. The default is to use the current locale as defined by the LANG and LC_* environment variables. :edl. :p. :p.:hp7.Returns:ehp7. :p.The transformed string, encoded using the same codepage as the input string. If an error occurs during transformation, an empty string ("") is returned and the global ULSERR variable will be set to a non-zero value. .* ---------------------------------------------------------------------------- :h2 x=left y=bottom width=100% height=100% id=ulsversion.ULSVersion :p.:hp7.Syntax:ehp7. :cgraphic. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � � � &rahead.&rahead.컴ULSVersion()컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴�&rahead.&lahead. � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� :ecgraphic. :p.:hp7.Description:ehp7. :p.Returns the current version of the RxULS library. :p. :p.:hp7.Parameters:ehp7. :p.None. :p. :p.:hp7.Returns:ehp7. :p.The current library version, in the form ":hp1.major:ehp1..:hp1.minor:ehp1..:hp1.refresh:ehp1.". :p. :p.:hp7.Example:ehp7. :xmp. SAY 'Using RXULS.DLL version&colon.' ULSVersion() :exmp. :p.The following is a sample of output from the above example&colon. :xmp. Using RXULS.DLL version&colon. 0.6.0 :exmp. .****************************************************************************** :h1 x=left y=bottom width=100% height=100% id=appa.Appendix A&colon. OS/2 Codepages :p.The codepages listed below may be used as source or target codepages in conjunction with the RxULS functions. :p.The codepage descriptions list the name of the applicable character set, optionally followed by a comma and additional details about the specific encoding standard used, optionally followed, in brackets, by the name of the applicable country, region or application. :p.Codepages prefixed with 'IBM' indicate encodings based on modifications of the DOS Extended ASCII layout, and are not recommended for cross-platform interchange. :nt.Not all codepages may be available on all systems.:ent. :p. :p.:hp7.Unicode Codepages:ehp7. :xmp. 1200 Unicode, UCS-2 (2-byte Universal Character Set encoding) 1207 Unicode, UPF-8 (8-bit Unicode Processing Format) 1208 Unicode, UTF-8 (8-bit Unicode Transformation Format) :exmp. :p.:hp7.ASCII-based (PC) Codepages:ehp7. :xmp. 367 ASCII, 7-bit 437 DOS Extended ASCII (United States) 813 ISO Greek, ISO-8859-7 819 ISO Latin 1, ISO-8859-1 850 IBM Latin 1, :link reftype=fn refid=ibm858.Modified:elink. (Multilingual) 851 DOS Greek 852 IBM Latin 2 (Eastern Europe) 855 IBM Cyrillic 856 DOS Hebrew 857 IBM Latin 5 (Turkey) 859 IBM Latin 9 (Multilingual) 860 IBM Portuguese 861 IBM Icelandic 862 IBM Hebrew, :link reftype=fn refid=ibm867.Modified:elink. (Israel) 863 IBM Canadian French 864 IBM Arabic 865 IBM Nordic 866 IBM Russian 868 IBM Urdu 869 IBM Greek 874 Thai, TIS-620/ISO-8859-11 Extended 878 Internet Russian, KOI8-R 891 Korean ASCII Extended + Half-Width Hangul, SBCS-PC 895 Japanese JIS-Roman, 7-bit 897 Japanese JISX0201-1976, SBCS-PC 903 Simplified Chinese ASCII Extended, SBCS-PC (PRC) 904 Traditional Chinese ASCII Extended, SBCS-PC (Taiwan) 907 APL 909 APL2 Extended 910 APL2 912 ISO Latin 2, ISO-8859-2 913 ISO Latin 3, ISO-8859-3 914 ISO Latin 4, ISO-8859-4 915 ISO Cyrillic, ISO-8859-5 916 ISO Hebrew, ISO-8859-8 920 ISO Latin 5, ISO-8859-9 921 ISO Latin 7, ISO-8859-13 922 Estonian 923 ISO Latin 9, ISO-8859-15 (Multilingual) 932 Japanese, MBCS-PC/Shift-JIS [aliased to 943] 934 Korean, MBCS-PC legacy encoding [aliased to 944] 936 Simplified Chinese, MBCS-PC legacy encoding (PRC) [aliased to 946] 938 Traditional Chinese CNS11643 Extended, MBCS-PC (Taiwan) [aliased to 948] 942 Japanese JISX0201-1976 + JISX0208-1978 Extended, Shift-JIS 943 Japanese JISX0201-1976 + JISX0208-1990 Windows31-J, Shift-JIS 944 Korean SAA 946 Simplified Chinese SAA (PRC) 948 Traditional Chinese SAA (Taiwan) 949 Korean KSC5601, :link reftype=fn refid=uhc.MBCS-PC/KS-Code:elink. 950 Traditional Chinese Big-5, MBCS-PC/Big-5 (Taiwan) 954 Japanese, EUC-JP 964 Traditional Chinese, EUC-TW (Taiwan) 970 Korean, EUC-KR 1004 Windows Latin 1 Extended 1006 Urdu 1008 Windows Arabic, Original 1041 Japanese JISX0201 Extended, SBCS-PC [identical to 897] 1043 Traditional Chinese ASCII Extended, SBCS-PC [identical to 904] 1051 HP Roman 8 1088 Korean ASCII Extended, SBCS-PC 1089 ISO Arabic, ISO-8859-6 1098 IBM Farsi 1114 ASCII + PC Symbols, 7-bit SBCS-PC (PRC &. Taiwan) 1115 Simplified Chinese ASCII Extended, SBCS-PC 1116 IBM Estonian 1117 IBM Latvian 1118 IBM Lithuanian 1119 IBM Lithuanian &. Russian 1124 Ukrainian, :link reftype=fn refid=ibm1124.Modified ISO Cyrillic:elink. 1125 IBM Ukrainian 1131 IBM Belarussian 1250 Windows Latin 2 1251 Windows Cyrillic 1252 Windows Latin 1 1253 Windows Greek 1254 Windows Turkish 1255 Windows Hebrew 1256 Windows Arabic 1257 Windows Latin 4 1275 Apple Latin 1 1276 Adobe PostScript Standard Encoding 1277 Adobe PostScript Latin 1 Encoding 1280 Apple Greek 1281 Apple Turkish 1282 Apple Central European 1283 Apple Cyrillic 1381 Simplified Chinese GB2312 Extended, MBCS-PC (PRC) 1383 Simplified Chinese, EUC-CN (PRC) 1386 Simplified Chinese GBK, MBCS-PC (PRC) :exmp. :p.:hp7.EBCDIC-based (mainframe) codepages:ehp7. :xmp. 37 United States/Canada, CECP 273 Germany/Austria, CECP 277 Denmark/Norway, CECP 278 Finland/Sweden, CECP 280 Italy, CECP 282 Portugal, CECP 284 Spain/Latin America, CECP 285 United Kingdom, CECP 290 Japanese Half-Width Katakana Extended, SBCS-Host 293 APL 297 France, CECP 361 International - Publishing 382 Austria/Germany - Publishing 383 Belgium - Publishing 385 Canadian French - Publishing 386 Denmark/Norway - Publishing 387 Finland/Sweden - Publishing 388 France - Publishing 389 Italy - Publishing 391 Portugal - Publishing 392 Spain/Philippines - Publishing 393 Latin America - Publishing 394 United Kingdom/Ireland - Publishing 395 United States/Canada - Publishing 420 Arabic Bilingual 424 Hebrew (Israel) 500 International 833 Korean, SBCS-Host 838 Thai 870 Latin 2 (Eastern Europe) 871 Iceland, CECP 875 Greek 918 Urdu 924 Latin 9 (Multilingual) 930 Japanese JISX0201-1976 + JISX208-1990 Extended, MBCS-Host 931 Japanese Latin, MBCS-Host 933 Korean KSC5601, MBCS-Host 935 Simplified Chinese GB2312 Extended, MBCS-Host (PRC) 937 Traditional Chinese CNS11643 Extended, MBCS-Host (Taiwan) 939 Japanese Extended, MBCS-Host 1025 Cyrillic 1026 Latin 5 (Turkey) 1027 Japanese JISX0201-1976 Extended, SBCS-Host 1028 Hebrew - Publishing 1046 Arabic 1047 Open Systems 1097 Farsi 1112 Baltic 1122 Estonia 1123 Ukrainian 1140 United States/Canada, ECECP 1141 Germany, ECECP 1142 Denmark/Norway, ECECP 1143 Finland/Sweden, ECECP 1144 Italy, ECECP 1145 Spain/Latin America, ECECP 1146 UK/Ireland, ECECP 1147 France, ECECP 1148 Multilingual, ECECP 1149 Iceland, ECECP :exmp. :p.:hp7.Other Codepages:ehp7. :xmp. 259 Host Symbols - WP 300 Japanese JISX0208-1990, DBCS-Host 301 Japanese JISX0208-1990, DBCS-PC 363 Host Symbols - Publishing 829 Host Math Symbols - Publishing 834 Korean KSC5601, DBCS-Host 835 Traditional Chinese CNS11643 Extended, DBCS-Host (Taiwan) 837 Simplified Chinese GB2312 Extended, DBCS-Host (PRC) 896 Japanese Half-Width Katakana, 7-bit 926 Korean, DBCS-PC legacy encoding [aliased to 944] 927 Traditional Chinese CNS11643 Extended, DBCS-PC [aliased to 948] 928 Simplified Chinese, DBCS-PC legacy encoding [aliased to 946] 941 Japanese JISX0208-1990 Extended, DBCS-PC/Shift-JIS [aliased to 943] 947 Traditional Chinese Big-5, DBCS-PC/Big-5 [aliased to 950] 951 Korean KSC5601, DBCS-PC/KS-Code [aliased to 949] 952 Japanese JISX0208-1990, EUC encoded 953 Japanese JISX0212-1990, EUC encoded 955 Japanese JISX0208-1978, canonical 971 Korean KSC5601, canonical 1038 Adobe PostScript Symbol Set 1092 Modified PC Symbols 1380 Simplified Chinese GB2312 Extended, DBCS-PC [aliased to 1381] :exmp. :fn id=ibm858. :p.The current implementation of codepage 850 has replaced the dotless i at position 0xD5 with the Euro symbol. (The modified codepage is officially registered as IBM Coded Character Set ID number 858.) :efn. :fn id=ibm867. :p.The current implementation of codepage 862 has replaced the Florin symbol at position 0x9F with the New Shequel symbol, and the inverted exclamation mark at position 0xAD with the Euro symbol. (The modified codepage is officially registered as IBM Coded Character Set ID number 867.) :efn. :fn id=uhc. :p.The codepage 949 table (:hp2.IBM949:ehp2.) included by default with OS/2 supports only the KSC5601 EUC code set 1 plus IBM DBCS-PC extensions (0x9A** to 0xA0**). :p.A replacement codepage table is available through http&colon.//www.borgendale.com/uls.htm, which updates codepage 949 to support the MS Unified Hangul Code ("Extended Wansung") encoding. This enables full support for the Johab character set. :efn. :fn id=ibm1124. :p.Codepage 1124 is a modification of ISO-8859-5 (codepage 915) with the Ukrainian GHE characters replacing GJE at positions 0xA3 and 0xF3. :efn. :euserdoc.