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
0
votes
1 answer

Why Java doesn't throw exception when decoding bytes to string failed?

If there is some exception when decoding failed, then we can try to detect the file encoding by one by one trying. But I didn't found a way which will throw some exception like 'UnicodeDecodeError' in python, is there some specific reason? PS: the…
luochen1990
  • 3,689
  • 1
  • 22
  • 37
0
votes
0 answers

Gsutil with rsync: Invalid Unicode Path Enountered

I am using gsutil combined with the "rsync" command to upload a business critical files to google storage as a backup. Unfortunately most of the archives and filenames are Greek for example "αντιγραφο.txt". On english files, rsync is ok, but when…
0
votes
0 answers

File encoding latin character in Java

I have a template file (template.txt) saved in utf-8 format. Contents are as below: placholder1¬placholder2 Notice that it has a latin character ¬ . My Java application reads this file replaces the placeholder as per business logic and saves it to…
Xavier DSouza
  • 2,861
  • 7
  • 29
  • 40
0
votes
1 answer

Change file (editor) encoding in jgrasp to UTF-8

So... I was testing jGrasp and when i openned my testing file I saw something like this: ¿Khà? instead of this: ¿Khà? but when i compile it, first i got the weird characters (the encoding was wrong). So i changed the encoding on the…
0
votes
0 answers

Java files become messy code in intellij idea

I try import a project created by eclipse into intellij idea, and I have setted the file encode to UTF-8 in both eclipse and intellij idea, like this: But there are all messy codes when I open a java file in intellij idea, like this: What makes me…
yinhao
  • 1
0
votes
2 answers

c# getting anc changing the file encoding

I'm a little bit confused about the file encoding. I want to change it. Here is my code: public class ChangeFileEncoding { private const int BUFFER_SIZE = 15000; public static void ChangeEncoding(string source, Encoding…
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
0
votes
0 answers

File encoding incorrectly detected

On Linux server if user uploads a CSV file created in MS Office Excel (thus having Windows 1250 [or cp1250 or ASCII if you want to] encoding) all to me known methods of detecting the file encoding return incorrect ISO-8859-1 (or latin1 if you want…
shadyyx
  • 15,825
  • 6
  • 60
  • 95
0
votes
2 answers

SQL Encoding Does Not Recognise Cyrillic

Ok I have 2 machines. When I open SSMS and write queries in sql file cyrillic works. When I transfer the same sql file to another machine the cyrillic looks like "Âàëåðè". If this problem is related to encoding, how to configure encoding on both…
TheChampp
  • 1,337
  • 5
  • 24
  • 41
0
votes
1 answer

Phpstorm File Encoding Issue

I have a really frustrating issue with PhpStorm where I try to set my all my project files' encoding to ASCII, but the IDE keeps showing me a warning. When I reload with another encoding, it just messes up my whole code with French syntax. Here are…
0
votes
1 answer

pgAdmin Editor Rails execute SQL from file

Rails Code: sql = File.read("#{Rails.root}/scripts/refresh.sql") db_con = ActiveRecord::Base.connection db_con.execute(sql) file refresh.sql: select 1; If I create or modify file refresh.sql in pgAdmin (Ubuntu or Windows) I will get the following…
WiredIn
  • 4,157
  • 4
  • 27
  • 23
0
votes
2 answers

File encoding commande

I have 1200 files encoded ANSI. I need to convert them into UTF-8. It is not reasonable to convert each file using the simple solution file/save as! Is there a commande in php which convert files from ANSI to UTF-8?
Rim
  • 185
  • 3
  • 3
  • 11
0
votes
1 answer

Export json from python to C# file encoding issue

I have a python script that generates a json file that is further used on a C# application. This is the code creating the export: def put(data, filename): with open(filename, 'w') as outfile: json.dump(data, outfile, indent=4,…
nest
  • 1,385
  • 1
  • 15
  • 34
0
votes
1 answer

Strange behavior with objects with keys containing accented characters in Javascript

For a project, I am running a NodeJS app using Express. I wanted to organize my code and put some objects in a module I am calling with a require. Something like var xlsImport = require(path.join(__dirname, '../config/xlsImport.js'))(mongoose,…
3Pi
  • 31
  • 5
0
votes
1 answer

File encodings with ruby

I'm having a bit problems with file encodings. I'm receiving a url-encoded string like "sometext%C3%B3+more+%26+andmore", unescape it, process the data, and save it with windows-1252 encoding. The conversions are these: irb(main) >> value =>…
pablorc
  • 940
  • 1
  • 8
  • 20
1 2 3
8
9