diff options
Diffstat (limited to 'man/es/man1/dos2unix.txt')
-rw-r--r-- | man/es/man1/dos2unix.txt | 88 |
1 files changed, 82 insertions, 6 deletions
diff --git a/man/es/man1/dos2unix.txt b/man/es/man1/dos2unix.txt index 9eb86df..dc05298 100644 --- a/man/es/man1/dos2unix.txt +++ b/man/es/man1/dos2unix.txt @@ -93,6 +93,67 @@ PARÁMETROS Establece el modo de conversión, Donde CONVMODE puede ser: *ascii*, *7bit*, *iso*, *mac* siendo ascii el valor por defecto. + -D, --display-enc ENCODING + Set encoding of displayed text. Where ENCODING is one of: *ansi*, + *unicode*, *utf8* with ansi being the default. + + This option is only available in dos2unix for Windows with Unicode + file name support. This option has no effect on the actual file + names read and written, only on how they are displayed. + + There are several methods for displaying text in a Windows console + based on the encoding of the text. They all have their own + advantages and disadvantages. + + ansi + Dos2unix's default method is to use ANSI encoded text. The + advantage is that it is backwards compatible. It works with + raster and TrueType fonts. In some regions you may need to + change the active DOS OEM code page to the Windows system ANSI + code page using the "chcp" command, because dos2unix uses the + Windows system code page. + + The disadvantage of ansi is that international file names with + characters not inside the system default code page are not + displayed properly. You will see a question mark, or a wrong + symbol instead. When you don't work with foreign file names this + method is OK. + + unicode + The advantage of unicode (the Windows name for UTF-16) encoding + is that text is usually properly displayed. There is no need to + change the active code page. You may need to set the console's + font to a TrueType font to have international characters + displayed properly. When a character is not included in the + TrueType font you usually see a small square, sometimes with a + question mark in it. + + When you use the ConEmu console all text is displayed properly, + because ConEmu automatically selects a good font. + + The disadvantage of unicode is that it is not compatible with + ASCII. The output is not easy to handle when you redirect it to + another program or a file. Redirection to a file does not give a + correct UTF-16 file. + + utf8 + The advantage of utf8 is that it is compatible with ASCII and + when you redirect it to a file you get a proper UTF-8 file. You + need to set the console's font to a TrueType font. With a + TrueType font the text is displayed similar as with the + "unicode" encoding. + + The disadvantage is that when you use the default raster font + all non-ASCII characters are displayed wrong. Not only unicode + file names, but also translated messages become unreadable. On + Windows configured for an East-Asian region you may see a lot of + flickering of the console when the messages are displayed. + + In a ConEmu console the utf8 encoding method works well. + + The default encoding can be changed with environment variable + DOS2UNIX_DISPLAY_ENC by setting it to "unicode" or "utf8". + -f, --force Fuerza la conversión de archivos binarios. @@ -192,7 +253,7 @@ PARÁMETROS escribirá un BOM UTF-16. No utilice esta opción cuando la codificación de salida sea distinta - de UTF-8 o UTF-16. Véase también la sección UNICODE. + de UTF-8, UTF-16 o GB18030. Véase también la sección UNICODE. -n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ... Modo de archivo nuevo. Convierte el archivo ARCHIVO_DE_ENTRADA y @@ -431,6 +492,18 @@ UNICODE Dos2unix y unix2dos escriben siempre BOM cuando se usa la opción "-m". + Unicode file names on Windows + Dos2unix has optional support for reading and writing Unicode file names + in the Windows Command Prompt. That means that dos2unix can open files + that have characters in the name that are not part of the default system + ANSI code page. To see if dos2unix for Windows was built with Unicode + file name support type "dos2unix -V". + + There are some issues with displaying Unicode file names in a Windows + console. See option "-D", "--display-enc". The file names may be + displayed wrongly in the console, but the files will be written with the + correct name. + Ejemplos Unicode Convertir de Windows UTF-16 (con una BOM) a Unix UTF-8: @@ -460,10 +533,9 @@ GB18030 En Unix/Linux los archivos UTF-16 se convierten a GB18030 cuando la codificación local se establece en GB18030. Tenga en cuenta que esto - sólo funcionará si se establece la ubicación en China. Por ejemplo en - una configuración local English British la conversión "en_GB.GB18030" de - UTF-16 a GB18030 no funcionará, pero en una configuración local China - "zh_CN.GB18030" sí lo hará. + sólo funcionará si la configuración local es soportada por el sistema. + Utilice "locale -a" para obtener el listado de configuraciones + regionales admitidas. Use la opción "-ul" o "-ub" para convertir un archivo UTF-16 sin BOM. @@ -532,7 +604,11 @@ CONVERSIÓN RECURSIVA directorios. Por ejemplo para convertir todos los archivos .txt en el árbol de directorios debajo del directorio actual escriba: - find . -name *.txt |xargs dos2unix + find . -name '*.txt' |xargs dos2unix + + In a Windows Command Prompt the following command can be used: + + for /R %G in (*.txt) do dos2unix "%G" INTERNACIONALIZACIÓN LANG |