Questions tagged [file-encodings]

In communications and Information processing, file-encoding is the process by which information from a source is converted into symbols to be communicated.The tag file-encoding refers to programming related questions belongs to various encoding schemes for file formats.

Wiki:

Encoding of a file is achieved by converting information into another form of representation. The information can be then converted in any file format. The encoding of a file must follow the rules of file format specifications. Every known file format has its own header structure and while writing a file, encoder must obey rules of file header format.

Example: Analog data which comes through a device sensor or a camera can be converted into digital data which later can be written in a file with image formats like .BMP .JPG .PNG TIFF GIF etc. The BMP or Bitmap file format is a common and simplest kind of image format which can be encoded with various encoding schemes like Monochrome encoding, 24-Bit encoding etc. and This must be done so that the Decoder applications, browsers and Image viewers can decode the encoded file formats.

Usage:

The tag file-encodings can be used for file encoding related programming questions. The tag should not be confused with related programming questions.

135 questions
5
votes
2 answers

VS 2012 Encoding in the declaration 'utf-16' does not match document 'utf-8'

When I open Visual Studio 2012, I am greeted with the message "Visual Studio The encoding in the declaration 'utf-16' does not match the encoding of the document 'utf-8'". Does anyone know why this might be happening? Or what troubleshooting I…
Ryan Gates
  • 4,501
  • 6
  • 50
  • 90
4
votes
1 answer

Should I ensure that all my web application code is UTF-8?

I have a Django site that contains only English language strings. I'll be localising this to other languages. I haven't set any sort of file encoding options. Do need to convert all my Python code to UTF-8? is this a good practice? If so, do I need…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
4
votes
2 answers

How to completely turn off vim's abilty to recode files?

Every encodings related question I've found is about how to recode files. However, mine is quite contrary one - is it possible to make vim not to recode files at all? (and how, if so?) Sometimes it is writing [converted] at the status line, and…
Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
4
votes
1 answer

Eclipse: How to set file encoding based on file extension

Problem I have an eclipse project that is committed to source control. The project looks something like this: MyProject .classpath .project src/ com/myCompany/code DoStuff.java DoOtherStuff.java …
sixtyfootersdude
  • 25,859
  • 43
  • 145
  • 213
3
votes
3 answers

Python encoding - Is there any explanation?

Can someone explain to me why python has this behaviour? Let's me explain. BACKGROUND I have a python installation and I want to use some chars that aren't in the ASCII table. So I change my python default enconding. I save every string, into a file…
DonCallisto
  • 29,419
  • 9
  • 72
  • 100
3
votes
1 answer

Config encoding per file in git repository for proper output of `git diff`

Suppose I have two files in my git repository with different encodings: UTF-8 and CP866. I have console and etc configured with UTF-8 settings. I want output of git commands like git diff or git show behave properly and don't show something like…
petRUShka
  • 9,812
  • 12
  • 61
  • 95
3
votes
4 answers

Convert files encoding

I have a PHP application who's files encoding is Greek ISO (iso-8859-7). I want to convert the files to utf-8 but simply saving the files with utf-8 isn't enough since the Greek texts get garbled. Is there an "automatic" method to do this so that I…
bikey77
  • 6,384
  • 20
  • 60
  • 86
3
votes
2 answers

Division symbol in text file in raw folder

I have ÷ in .txt file in my android. When this division symbol is shown on android device, I see "�" To make it worse, my laptop doesn't have division sign on keyboard. I used the above sign from wikipedia. Any guess how can I resolve this.
3
votes
2 answers

How to set default system file encoding in IntelliJ IDEA

I want IDEA to use whatever default system encoding is, instead it uses whatever is set through Settings > File Encodings. Which is set to UTF-8. My application runs fine in Eclipse, which uses default system encoding on windows, but it is having…
Watt
  • 3,118
  • 14
  • 54
  • 85
2
votes
1 answer

C#: "Swedish" characters in Xpath when parsing Lating1Encoded docs

I've a set of html docs that I need to parse. They are encoded in Latin1Encoded. I'm using HtmlAgiliy pack for "parsing". I have a Xpath query (with swedish characters) that I can't get to work because of different encodings between the docs and…
Niels Bosma
  • 11,758
  • 29
  • 89
  • 148
2
votes
2 answers

Spaces in PHP causing meaningless errors?

I'm editing the functions.php file of a WordPress theme and whenever I edit it, even when the edit is adding a single space the server returns error: Parse error: syntax error, unexpected '}' in /theme/functions.php on line 1 This is where…
Mohammad
  • 7,344
  • 15
  • 48
  • 76
2
votes
0 answers

Trying to nail down the file encoding of a log file using UnicodeDammit?

Though I understand that it is sometimes impossible to determine a file encoding, I'm trying here. Bash In bash file yields: Non-ISO extended-ASCII text, with CRLF line terminators vim In Vim the ex command :set fileencoding=?…
leeand00
  • 25,510
  • 39
  • 140
  • 297
2
votes
1 answer

Why choose EUC-JP over UTF-8 or SHIFT-JIS?

I've been working with a Japanese company who chooses to encode our files with EUC-JP. I've been curious for quite a while now and tried asking superiors why EUC-JP over SHIFT-JIS or UTF-8, but get answers "like it's convention or such". Do you know…
Wolf
  • 91
  • 1
  • 7
2
votes
2 answers

Write as CSV giving weird characters

I am trying to write a dataframe as csv, which succeeds, but end up some fields with weird characters, Say for example 4.5×10−7 gives 4.5×10−7 in the csv file. After doing few research I used fileEncoding as "Windows-1252", but that dint help.…
Gerg
  • 336
  • 4
  • 14
2
votes
1 answer

file encoding generating blank character in ruby -- why?

I'm using this little bit of ruby: File.open(ARGV[0], "r").each_line do |line| puts "encoding: #{line.encoding}" line.chomp.split(//).each do |char| puts "[#{char}]" end end And I have a sample file that I'm feeding in the file just…
Stewart Johnson
  • 14,281
  • 7
  • 61
  • 70
1
2
3
8 9