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

Inconsistent file behavior

I'm trying to track down a Python UnicodeDecodeError in the following log line: 10.210.141.123 - - [09/Nov/2011:14:41:04 -0800] "gfR\x15¢\x09ì|Äbk\x0F[×ÐÖà\x11CEÐÌy\x5C¿DÌj\x08Ï…
Kevin Burke
  • 61,194
  • 76
  • 188
  • 305
0
votes
0 answers

Reading from a .wav file where Subchunk2ID is "list" and not "data"

I started working on a small project to edit raw .wav files in C but came across a problem regarding reading the sound files. Everywhere i found some code it refered to the case where Subchunk2ID is data but all converters (from .mp3 or .m4a to…
Tudor
  • 436
  • 3
  • 10
0
votes
0 answers

How do decode base64 video and play the video using flutter?

am recording the video using camera plugin and saved the video in internal storage path then i have encoded video using base64.Now i need to decode the encoded value and play the decoded value in flutter application.If any one can help me. thanks in…
Yuva
  • 121
  • 9
0
votes
0 answers

Check DocumentFile is editable text file or not in Android java

var documentFile = DocumentFile.fromSingleUri(this,uri); if(documentFile.isFile() && isEditableFileType(documentFile.getType())){ BaseApp.showToast("Y=> "+documentFile.getType()); }else{ …
Sue007
  • 21
  • 2
0
votes
1 answer

Python file encrypting

I am trying to write a program that will encrypt a file by using the .read() function on the file content, which returns 98\xf1\xc6}xb1\*.... I am trying to encrypt the file by looping through each character an incrementing its decimal number by 1…
logan_9997
  • 574
  • 2
  • 14
0
votes
1 answer

Read and parsing SHiftJIS file in a UTF8 JVM

I have a Japanese client that provide a data feed file in SHift-JIS encoding (with both Kana and Kanji Japanese characters). I have to upload the data in that Shift-JIS Japanese feed file, into my web application JVM, with startup option as UTF-8…
BorisJ
  • 46
  • 3
0
votes
0 answers

How to encode a csv file to UTF-8 using C# and asp.net core?

I have a csv file which contains latin characters (Ascii value > 127). The file gets uploaded with any type of encoding and shows the right data after uploading. But it gets converted automatically to UTF8 after performing operations on the…
0
votes
0 answers

Why do we save compressed file as .bin format after applying Huffman encoding?

I am making a text file compression tool that first compresses the file using Run-length encoding and then further compresses it with Huffman encoding. After Compressing the file why do we store it in .bin format? Let's consider that the file to be…
0
votes
0 answers

Option to remove Control M not available in Eclipse version 2020-12 (4.18.0)

I am trying to use the option "File-->Convert Line Delimiters To-->Unix" in the Eclipse Version: 2020-12 (4.18.0) Build id: 20201210-1552 But it does not seem to have it anymore. It use to always be there and is still there in the Spring Tool Suite…
0
votes
0 answers

Get char encoding information in scala

import scala.io.Source def checkCodec(filename:String): String = { val bufferedSource = Source.fromFile(filename) val codec:String = (bufferedSource.codec).toString println("bufferedSource.codec - "…
0
votes
0 answers

File.CreateText encoding as UTF-8 in some environments but and UTF-8 with BOM in others

We are using the File.CreateText method which according to MSDN: Creates or opens a file for writing UTF-8 encoded text. If the file already exists, its contents are…
user2727893
  • 97
  • 1
  • 9
0
votes
1 answer

Transcoding with Gradle

My build.gradle file generates UNIX and Windows launcher scripts for my Java project from templates. Templates are UTF-8 encoded and the generated scripts are UTF-8 too. It's not a problem on Linux where UTF-8 support is ubiquitous, but Windows has…
0
votes
1 answer

Formatted output to file (write())

I am facing problem when I try to write information to the file using .format(). I am trying to write() text that has been read from text file to another file and then write information about every line: {0} - the number of lines {1} - how many…
0
votes
1 answer

How to change file encoding table in java

I have my code to check encoding table: System.out.println("enc. table: "+System.getProperty("file.encoding") + "enc. table: "+new java.io.OutputStreamWriter(new java.io.ByteArrayOutputStream()).getEncoding() + "enc. table:" +…
Ballon
  • 6,882
  • 18
  • 49
  • 63
0
votes
0 answers

base64 decoding fails when assigning bash variable?

I have failed to understand the following behaviour. First encoding that seems ok to me: $ echo -n "Cg==" | base64 -d | xxd 00000000: 0a $ echo -n "Cgo=" | base64 -d | xxd 00000000: 0a0a When I assign the decoding to a variable I lose LF in the…
Olof
  • 1
  • 2
1 2 3
8 9