Questions tagged [encoding]

The fine art of converting letters into numbers. ASCII, ISO Latin-1, Unicode, EBCDIC… There are dozens of currently used encodings and converting between them is now a witch craft.

742 questions
409
votes
20 answers

How to encode base64 via command line?

Is there a terminal command in Mac OS X which will base64 encode a file or stdin?
Josh
  • 9,487
  • 11
  • 49
  • 70
204
votes
9 answers

Change default code page of Windows console to UTF-8

Currently I'm running Windows 7 x64 and usually I want all console tools to work with UTF-8 rather than with default code page 850. Running chcp 65001 in the command prompt prior to use of any tools helps but is there any way to set is as default…
Regent
  • 2,346
  • 3
  • 16
  • 8
154
votes
3 answers

How and why is this string of text a fork bomb?

Found on a random chan board: echo "I
Karu
  • 4,634
  • 7
  • 34
  • 54
151
votes
2 answers

How do I change the character encoding for a webpage in Chrome?

Google Chrome, like almost every web browser in recent memory, used to have an option to change the character encoding for the webpage being viewed by going to Menu › Tools › Encoding (or some similar location). This is extraordinarily useful in…
Meshaal
  • 1,612
  • 2
  • 10
  • 7
110
votes
7 answers

In ffmpeg, how to delay only the audio of a .mp4 video without converting the audio?

In my .mp4 file the audio delay is -3840 ms. I synced it in KMplayer, and I don't want to use MKVGUI to make a .mkv file. I just need to delay the audio by 3840 ms, everything else should be left intact. What would be the right command to accomplish…
Alireza
  • 1,101
  • 2
  • 8
  • 3
97
votes
7 answers

Why are special characters such as "carriage return" represented as "^M"?

Why is ^M used to represent a carriage return in VIM and other contexts? My guess is that M is the 13th letter of the Latin alphabet and a carriage return is \x0D or decimal 13. Is this the reason? Is this representation documented anywhere? I…
dotancohen
  • 11,278
  • 19
  • 67
  • 96
92
votes
11 answers

How to auto detect text file encoding?

There are many plain text files which were encoded in variant charsets. I want to convert them all to UTF-8, but before running iconv, I need to know its original encoding. Most browsers have an Auto Detect option in encodings, however, I can't…
Lenik
  • 17,942
  • 25
  • 87
  • 119
64
votes
14 answers

Batch convert encoding in files

How can I batch-convert files in a directory for their encoding (e.g. ANSI → UTF-8) with a command or tool? For single files, an editor helps, but how can I do the mass files job?
desolat
  • 1,092
  • 1
  • 12
  • 17
59
votes
3 answers

How to encode audio with Opus codec?

The Opus audio codec looks like the best codec so far for compressing audio. It has recently become supported in the latest ffmpeg and VLC players. However, there is no documentation I can find on how to actually encode media with it. Can someone…
MrDrMcCoy
  • 967
  • 2
  • 9
  • 16
51
votes
1 answer

Check the character encoding of a given page in Chrome

Character encoding of an HTML document is determined by looking at various things (encoding in Content-Type header, meta elements, BOMs in data, etc.) In Chrome (56), is there a way to view the ultimate character encoding that it determined a given…
Jason C
  • 10,467
  • 9
  • 41
  • 64
50
votes
5 answers

How can I change the default encoding type Thunderbird uses when composing a new email?

Whenever I compose a new email message in Thunderbird, it defaults to the Western (ISO-8859-1) encoding, and I have to manually change it to UTF-8 every time. How do I change the default?
hpy
  • 6,001
  • 20
  • 60
  • 86
47
votes
3 answers

How can I convert from hex to base64?

Can anyone recommend a straightforward way/tool to convert hex to base64? I'm using Linux and OS X.
Tom Duckering
  • 603
  • 1
  • 5
  • 7
44
votes
3 answers

Sublime Text 2 - Encoding UTF-8

How do I change the file encoding in Sublime Text 2? How do I change character encoding of a text file in OpenOffice.org writer? http://www.sublimetext.com/forum/viewtopic.php?f=4&t=3541
user216268
  • 541
  • 1
  • 4
  • 3
41
votes
14 answers

How to decompress a ZIP file with specified file/directory name character encoding?

I got ZIP file(s), which contains files, which filenames are in some encoding. Let's say I know encoding of those filenames, but I still dont know how to properly decompress them. Here is example file, it contains one file "【SSK字幕组】The Vampire…
2ge
  • 511
  • 1
  • 5
  • 4
38
votes
6 answers

́╗┐' is not recognized as an internal or external command

When executing certain files (mainly batch) using PsExec I get these weird ́╗┐' symbols before my command. My initial thought was, that I were using wrong encoding, but after checking, I realized that all my files were using UTF-8.
user187509
1
2 3
49 50