191 |
each unibyte character to a multibyte character. |
each unibyte character to a multibyte character. |
192 |
@end defun |
@end defun |
193 |
|
|
194 |
|
@defun string-to-multibyte string |
195 |
|
This function returns a multibyte string containing the same sequence |
196 |
|
of character codes as @var{string}. If @var{string} is a multibyte |
197 |
|
string, the value is the equal to @var{string}. |
198 |
|
@end defun |
199 |
|
|
200 |
@node Selecting a Representation |
@node Selecting a Representation |
201 |
@section Selecting a Representation |
@section Selecting a Representation |
202 |
|
|
235 |
If @var{string} is already a unibyte string, then the value is |
If @var{string} is already a unibyte string, then the value is |
236 |
@var{string} itself. Otherwise it is a newly created string, with no |
@var{string} itself. Otherwise it is a newly created string, with no |
237 |
text properties. If @var{string} is multibyte, any characters it |
text properties. If @var{string} is multibyte, any characters it |
238 |
contains of charset @var{eight-bit-control} or @var{eight-bit-graphic} |
contains of charset @code{eight-bit-control} or @code{eight-bit-graphic} |
239 |
are converted to the corresponding single byte. |
are converted to the corresponding single byte. |
240 |
@end defun |
@end defun |
241 |
|
|
248 |
@var{string} itself. Otherwise it is a newly created string, with no |
@var{string} itself. Otherwise it is a newly created string, with no |
249 |
text properties. If @var{string} is unibyte and contains any individual |
text properties. If @var{string} is unibyte and contains any individual |
250 |
8-bit bytes (i.e.@: not part of a multibyte form), they are converted to |
8-bit bytes (i.e.@: not part of a multibyte form), they are converted to |
251 |
the corresponding multibyte character of charset @var{eight-bit-control} |
the corresponding multibyte character of charset @code{eight-bit-control} |
252 |
or @var{eight-bit-graphic}. |
or @code{eight-bit-graphic}. |
253 |
@end defun |
@end defun |
254 |
|
|
255 |
@node Character Codes |
@node Character Codes |
279 |
@result{} t |
@result{} t |
280 |
@end example |
@end example |
281 |
|
|
282 |
If the optional argument @var{genericp} is non-nil, this function |
If the optional argument @var{genericp} is non-@code{nil}, this |
283 |
returns @code{t} if @var{charcode} is a generic character |
function returns @code{t} if @var{charcode} is a generic character |
284 |
(@pxref{Splitting Characters}). |
(@pxref{Splitting Characters}). |
285 |
@end defun |
@end defun |
286 |
|
|
325 |
This function returns the charset property list of the character set |
This function returns the charset property list of the character set |
326 |
@var{charset}. Although @var{charset} is a symbol, this is not the same |
@var{charset}. Although @var{charset} is a symbol, this is not the same |
327 |
as the property list of that symbol. Charset properties are used for |
as the property list of that symbol. Charset properties are used for |
328 |
special purposes within Emacs; for example, |
special purposes within Emacs. |
|
@code{preferred-coding-system} helps determine which coding system to |
|
|
use to encode characters in a charset. |
|
329 |
@end defun |
@end defun |
330 |
|
|
331 |
@node Chars and Bytes |
@node Chars and Bytes |
399 |
(make-char 'latin-iso8859-1 72) |
(make-char 'latin-iso8859-1 72) |
400 |
@result{} 2248 |
@result{} 2248 |
401 |
@end example |
@end example |
402 |
|
|
403 |
|
Actually, the eighth bit of both @var{code1} and @var{code2} is zeroed |
404 |
|
before they are used to index @var{charset}. Thus you may use, for |
405 |
|
instance, an ISO 8859 character code rather than subtracting 128, as |
406 |
|
is necessary to index the corresponding Emacs charset. |
407 |
@end defun |
@end defun |
408 |
|
|
409 |
@cindex generic characters |
@cindex generic characters |
514 |
coding systems that don't specify any other translation table. |
coding systems that don't specify any other translation table. |
515 |
@end defvar |
@end defvar |
516 |
|
|
517 |
|
@defvar translation-table-for-input |
518 |
|
Self-inserting characters are translated through this translation |
519 |
|
table before they are inserted. |
520 |
|
@end defvar |
521 |
|
|
522 |
@node Coding Systems |
@node Coding Systems |
523 |
@section Coding Systems |
@section Coding Systems |
524 |
|
|
901 |
the subprocess, and @var{output-coding} applies to output to it. |
the subprocess, and @var{output-coding} applies to output to it. |
902 |
@end defvar |
@end defvar |
903 |
|
|
904 |
|
@defvar auto-coding-functions |
905 |
|
This variable holds a list of functions that try to determine a |
906 |
|
coding system for a file based on its undecoded contents. |
907 |
|
|
908 |
|
Each function in this list should be written to look at text in the |
909 |
|
current buffer, but should not modify it in any way. The buffer will |
910 |
|
contain undecoded text of parts of the file. Each function should |
911 |
|
take one argument, @var{size}, which tells it how many characters to |
912 |
|
look at, starting from point. If the function succeeds in determining |
913 |
|
a coding system for the file, it should return that coding system. |
914 |
|
Otherwise, it should return @code{nil}. |
915 |
|
|
916 |
|
If a file has a @samp{coding:} tag, that takes precedence, so these |
917 |
|
functions won't be called. |
918 |
|
@end defvar |
919 |
|
|
920 |
@defun find-operation-coding-system operation &rest arguments |
@defun find-operation-coding-system operation &rest arguments |
921 |
This function returns the coding system to use (by default) for |
This function returns the coding system to use (by default) for |
922 |
performing @var{operation} with @var{arguments}. The value has this |
performing @var{operation} with @var{arguments}. The value has this |
1070 |
string is acceptable. |
string is acceptable. |
1071 |
@end defun |
@end defun |
1072 |
|
|
1073 |
|
@defun decode-coding-inserted-region from to filename &optional visit beg end replace |
1074 |
|
This function decodes the text from @var{from} to @var{to} as if |
1075 |
|
it were being read from file @var{filename} using @code{insert-file-contents} |
1076 |
|
using the rest of the arguments provided. |
1077 |
|
|
1078 |
|
The normal way to use this function is after reading text from a file |
1079 |
|
without decoding, if you decide you would rather have decoded it. |
1080 |
|
Instead of deleting the text and reading it again, this time with |
1081 |
|
decoding, you can call this function. |
1082 |
|
@end defun |
1083 |
|
|
1084 |
@node Terminal I/O Encoding |
@node Terminal I/O Encoding |
1085 |
@subsection Terminal I/O Encoding |
@subsection Terminal I/O Encoding |
1086 |
|
|
1276 |
locale is specified by environment variables in the usual POSIX fashion. |
locale is specified by environment variables in the usual POSIX fashion. |
1277 |
@end defvar |
@end defvar |
1278 |
|
|
1279 |
|
@defun locale-info item |
1280 |
|
This function returns locale data @var{item} for the current POSIX |
1281 |
|
locale, if available. @var{item} should be one of these symbols: |
1282 |
|
|
1283 |
|
@table @code |
1284 |
|
@item codeset |
1285 |
|
Return the character set as a string (locale item @code{CODESET}). |
1286 |
|
|
1287 |
|
@item days |
1288 |
|
Return a 7-element vector of day names (locale items |
1289 |
|
@code{DAY_1} through @code{DAY_7}); |
1290 |
|
|
1291 |
|
@item months |
1292 |
|
Return a 12-element vector of month names (locale items @code{MON_1} |
1293 |
|
through @code{MON_12}). |
1294 |
|
|
1295 |
|
@item paper |
1296 |
|
Return a list @code{(@var{width} @var{height})} for the default paper |
1297 |
|
size measured in milimeters (locale items @code{PAPER_WIDTH} and |
1298 |
|
@code{PAPER_HEIGHT}). |
1299 |
|
@end table |
1300 |
|
|
1301 |
|
If the system can't provide the requested information, or if |
1302 |
|
@var{item} is not one of those symbols, the value is @code{nil}. All |
1303 |
|
strings in the return value are decoded using |
1304 |
|
@code{locale-coding-system}. @xref{Locales,,, libc, GNU Libc Manual}, |
1305 |
|
for more information about locales and locale items. |
1306 |
|
@end defun |
1307 |
|
|
1308 |
|
@ignore |
1309 |
|
arch-tag: be705bf8-941b-4c35-84fc-ad7d20ddb7cb |
1310 |
|
@end ignore |