Jump to content

ULSGetUnicodeClipboard: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
==Description==
Retrieves Unicode text from the clipboard.
Retrieves Unicode text from the clipboard.


Line 5: Line 4:


==Arguments==
==Arguments==
ULSGetUnicodeClipboard( [targetcp] [, subchar] [, controls] [, path] )
ULSGetUnicodeClipboard( [targetcp] [, subchar] [, controls] [, path] )


Parameters:
===Parameters===
      targetcp The target codepage (a positive integer). This is the codepage
;targetcp:The target codepage (a positive integer). This is the codepage under which the returned string is to be encoded.  The default is the current process codepage.
                under which the returned string is to be encoded.  The default
;subchar:The substitution character for 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. The default value depends on the codepage; for most single-byte codepages it is 0x7F ().
                is the current process codepage.
:NOTE: Not all codepages appear to honour this setting!
 
;controls:The control-byte mapping flag. This specifies how to convert those byte values which can represent either control codes or glyphs depending on the context: specifically, 0x00-0x19 and 0x7F. Only the first character is significant, and (if specified) must be one of the following values:
      subchar   The substitution character for the target codepage. This is a
::D  data/control bytes: leave values unchanged; this is the default
                two-letter hexadecimal value between 00 and FF which represents
::G  displayable glyphs: convert according to codepage like any other character
                the character in the target codepage which will be used to
::C  control bytes: convert using standard IBM control mapping
                represent substituted (i.e. unsupported) characters. The
::L  treat linebreaks (CR and LF) as control bytes, but all others as displayable glyphs
                default value depends on the codepage; for most single-byte
;path:The path conversion flag.  This only applies to DBCS codepages, and indicates whether or not <string> should be assumed to contain a path specification. Only the first character is significant, and (if specified) must be one of the following values:
                codepages it is 0x7F ().
::Y  yes, assume string contains a path; this is the default
 
::N  no, assume string doesn't contain a path
                NOTE: Not all codepages appear to honour this setting!
 
      controls The control-byte mapping flag. This specifies how to convert
                those byte values which can represent either control codes or
                glyphs depending on the context: specifically, 0x00-0x19 and
                0x7F. Only the first character is significant, and (if
                specified) must be one of the following values:
                  D  data/control bytes: leave values unchanged; this is the
                    default
                  G  displayable glyphs: convert according to codepage like
                    any other character
                  C  control bytes: convert using standard IBM control mapping
                  L  treat linebreaks (CR and LF) as control bytes, but all
                    others as displayable glyphs
 
      path     The path conversion flag.  This only applies to DBCS codepages,
                and indicates whether or not <string> should be assumed to
                contain a path specification. Only the first character is
                significant, and (if specified) must be one of the following
                values:
                  Y  yes, assume string contains a path; this is the default
                  N  no, assume string doesn't contain a path


==Return Values==
==Return Values==
The text retrieved from the clipboard, as converted into the target codepage, or "" if no such text could be retrieved.
The text retrieved from the clipboard, as converted into the target codepage, or "" if no such text could be retrieved.


[[Category:The OS/2 API Project]]
[[Category:RxULS]]

Latest revision as of 14:16, 14 August 2017

Retrieves Unicode text from the clipboard.

This function attempts to retrieve existing clipboard data in the "text/unicode" format. (This format is used by Mozilla and some other applications directly; it is also supported by recent versions of the UClip library, as used by OpenOffice.org 2.x.)

Arguments

ULSGetUnicodeClipboard( [targetcp] [, subchar] [, controls] [, path] )

Parameters

targetcp
The target codepage (a positive integer). This is the codepage under which the returned string is to be encoded. The default is the current process codepage.
subchar
The substitution character for 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. The default value depends on the codepage; for most single-byte codepages it is 0x7F (?).
NOTE: Not all codepages appear to honour this setting!
controls
The control-byte mapping flag. This specifies how to convert those byte values which can represent either control codes or glyphs depending on the context: specifically, 0x00-0x19 and 0x7F. Only the first character is significant, and (if specified) must be one of the following values:
D data/control bytes: leave values unchanged; this is the default
G displayable glyphs: convert according to codepage like any other character
C control bytes: convert using standard IBM control mapping
L treat linebreaks (CR and LF) as control bytes, but all others as displayable glyphs
path
The path conversion flag. This only applies to DBCS codepages, and indicates whether or not <string> should be assumed to contain a path specification. Only the first character is significant, and (if specified) must be one of the following values:
Y yes, assume string contains a path; this is the default
N no, assume string doesn't contain a path

Return Values

The text retrieved from the clipboard, as converted into the target codepage, or "" if no such text could be retrieved.