diff options
| author | Eli Zaretskii | 2025-08-30 12:23:42 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-08-30 12:23:42 +0300 |
| commit | 3d2a8186793043805fd3d71ef5aa70e0a3ccc603 (patch) | |
| tree | f01d2545f66c978d91ede49420a7d5584163fbd7 /doc/misc | |
| parent | ec50d775acf6efa6e11347efecaa93d039cc5700 (diff) | |
| download | emacs-3d2a8186793043805fd3d71ef5aa70e0a3ccc603.tar.gz emacs-3d2a8186793043805fd3d71ef5aa70e0a3ccc603.zip | |
* doc/misc/efaq-w32.texi (UTF-8 encoding): New section (bug#79296).
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/efaq-w32.texi | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index e50716ff654..5c24364286d 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi | |||
| @@ -913,6 +913,7 @@ The doc string contains a list of the system sounds you can use. | |||
| 913 | * Multilingual fonts:: | 913 | * Multilingual fonts:: |
| 914 | * Font menu:: | 914 | * Font menu:: |
| 915 | * Line ends:: | 915 | * Line ends:: |
| 916 | * UTF-8 encoding:: | ||
| 916 | @end menu | 917 | @end menu |
| 917 | 918 | ||
| 918 | @node Font names | 919 | @node Font names |
| @@ -1191,6 +1192,69 @@ recent versions of Emacs, this is seldom useful for existing files, | |||
| 1191 | but can still be used to influence the choice of line ends for newly | 1192 | but can still be used to influence the choice of line ends for newly |
| 1192 | created files. | 1193 | created files. |
| 1193 | 1194 | ||
| 1195 | @node UTF-8 encoding | ||
| 1196 | @section Can I use UTF-8 as default encoding on MS-Windows? | ||
| 1197 | @cindex UTF-8 as default encoding on Windows | ||
| 1198 | @cindex codepage 65001 support in Emacs | ||
| 1199 | |||
| 1200 | Recent versions of MS-Windows (Windows 10 since build 1803, and Windows | ||
| 1201 | 11 or later versions) allow to use UTF-8 (a.k.a.@: ``codepage 65001'') | ||
| 1202 | as the default system codepage. As of this writing, this is still an | ||
| 1203 | experimental feature, even in Windows 11, and is disabled by default. | ||
| 1204 | On Windows 11 you can enable it as follows: | ||
| 1205 | |||
| 1206 | @enumerate | ||
| 1207 | @item | ||
| 1208 | Open Settings. | ||
| 1209 | |||
| 1210 | @item | ||
| 1211 | Select ``Time & Language'', then ``Language & region''. | ||
| 1212 | |||
| 1213 | @item | ||
| 1214 | Click on ``Administrative language settings''. | ||
| 1215 | |||
| 1216 | @item | ||
| 1217 | On the dialog that pops up click ``Change system locale...'' | ||
| 1218 | |||
| 1219 | @item | ||
| 1220 | In the ``Region Settings'' dialog that pops up, check the check-box | ||
| 1221 | labeled ``Beta: Use Unicode UTF-8 for worldwide language support'', then | ||
| 1222 | confirm by clicking ``OK'' to both dialogs. | ||
| 1223 | @end enumerate | ||
| 1224 | |||
| 1225 | @cindex UCRT runtime library | ||
| 1226 | @cindex MSVCRT runtime library | ||
| 1227 | Emacs supports this feature starting from version 30.2, but only when | ||
| 1228 | running on the versions of Windows that provide this feature, and only | ||
| 1229 | if the Emacs executable was linked against the @samp{UCRT} library as | ||
| 1230 | the Windows C runtime, not against the older @samp{MSVCRT}. This is | ||
| 1231 | because the C functions that deal with non-ASCII characters, as | ||
| 1232 | implemented by @samp{MSVCRT}, don't support UTF-8 as the multibyte | ||
| 1233 | encoding of non-ASCII characters. (Which runtime to link against is | ||
| 1234 | determined by the person who built your Emacs binary. Note that using | ||
| 1235 | Emacs linked against @samp{UCRT} needs all of the libraries loaded by | ||
| 1236 | Emacs dynamically, such as GnuTLS, image libraries like @samp{rsvg}, | ||
| 1237 | Tree-sitter, and all the others, to be also linked against @samp{UCRT}, | ||
| 1238 | otherwise subtle problems could happen when dealing with non-ASCII | ||
| 1239 | characters and strings.) | ||
| 1240 | |||
| 1241 | If you have an Emacs linked against @samp{UCRT}, and you turned on the | ||
| 1242 | UTF-8 support in Windows as described above, you can customize Emacs to | ||
| 1243 | use UTF-8 as your default encoding, e.g., by adding | ||
| 1244 | |||
| 1245 | @lisp | ||
| 1246 | (prefer-coding-system 'utf-8) | ||
| 1247 | @end lisp | ||
| 1248 | |||
| 1249 | @noindent | ||
| 1250 | to your init file, or by using the @samp{UTF-8} language environment | ||
| 1251 | (@pxref{Language Environments,,, emacs, The GNU Emacs Manual}) in your | ||
| 1252 | Emacs sessions. | ||
| 1253 | |||
| 1254 | Please be aware that, since this feature of Windows is still in beta, | ||
| 1255 | there could be some subtle issues with it. So we do not yet recommend | ||
| 1256 | to turn this on, unless you feel adventurous. | ||
| 1257 | |||
| 1194 | @c ------------------------------------------------------------ | 1258 | @c ------------------------------------------------------------ |
| 1195 | @node Printing | 1259 | @node Printing |
| 1196 | @chapter Printing | 1260 | @chapter Printing |