Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Browsing all 1039 articles
Browse latest View live

How to handle this subtle ambiguity of UTF-8 BOM?

The UTF-8 encoding allows both having and not having a BOM at the beginning of the byte sequence. This seems to create a subtle ambiguity, because the BOM itself represents the Unicode character...

View Article


PHP CSV encoding not utf-8 [duplicate]

I am generating a CSV file with PHP and saving it on the hard disk (I do not want a download). The database charset is utf8_general_ci and there are chars in there like the degrees sign (°), which show...

View Article


Difference between UTF-8 and UTF-16?

Difference between UTF-8 and UTF-16?Why do we need these?MessageDigest md = MessageDigest.getInstance("SHA-256");String text = "This is some text";md.update(text.getBytes("UTF-8")); // Change this to...

View Article

Arabic Character Encoding Issue: UTF-8 versus Windows-1256

Quick Background: I inherited a large SQL dump file containing a combination of English and Arabic text, and (I think) it was originally exported using 'latin1'. I changed all occurrences of 'latin1'...

View Article

wrong text file output of special characters using UTF-8 enconding in R 3.1.2...

I am having problems to write a csv file with Spanish accents, using R 3.1.2 and Mac OS X 10.6. I cannot write words with accents into text file.When I do:con <-...

View Article


PHP string functions vs mbstring functions

I have an application that has so far been in English only. Content encoding throughout templates and database has been UTF-8. I am now looking to internationalize/translate the application into...

View Article

Storing UTF-8 string in a UnicodeString

In Delphi 2007 you can store a UTF-8 string in a WideString and then pass that onto a Win32 function, e.g.var UnicodeStr: WideString; UTF8Str: WideString;begin UnicodeStr:='some unicode text';...

View Article

incompatible character encodings: UTF-8 and ASCII-8BIT in render action

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT): app/controllers/posts_controller.rb:27:in `new' # GET /posts/new def new if params[:post] @post =...

View Article


A UTF-8 text file is failing to import via pandas with a UTF-8 encoding error

I've got a text file exported from SQL as UTF-8 with about 5.5 million rows. I'm trying to then read this file with Pandas/Python, but gettingUnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in...

View Article


How to decode from ascii in rust? What's the analogue of rust's...

I have the following code:fn handle_client(mut stream: TcpStream) -> () { let mut buffer = [0; 4096]; stream.read(&mut buffer).expect("read fail"); let path_request: Cow<'_, str> =...

View Article

Python UTF-8 Lowercase Turkish Specific Letter

with using python 2.7:>myCity = 'Isparta'>myCity.lower()>'isparta'#-should be->'ısparta'tried some decoding, (like, myCity.decode("utf-8").lower()) but could not find how to do it. how can...

View Article

UnicodeDecodeError When Connecting to PostgreSQL Using psycopg2 in Python

I am encountering an issue when trying to connect to PostgreSQL using the psycopg2 library in Python. I get the following error:Traceback (most recent call last): File...

View Article

Image may be NSFW.
Clik here to view.

I am getting extra character  when i run sql file

I have a .sql file to create a Postgres function:CREATE FUNCTION id_generator°generateid() RETURNS SETOF integer AS$BODY$BEGIN RETURN QUERY SELECT max(ua_id) FROM user_attribute;...

View Article


How to decode from ascii in rust? What's the analogue of rust's...

I have the following code:fn handle_client(mut stream: TcpStream) -> () { let mut buffer = [0; 4096]; stream.read(&mut buffer).expect("read fail"); let path_request: Cow<'_, str> =...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article


'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)...

I am trying to run BookNLP model on a txt file in Colab, but I keep getting an error.the code:input_file="alice.txt"output_directory="alice"book_id="alice"booknlp.process(input_file, output_directory,...

View Article

Image may be NSFW.
Clik here to view.

Displaying Unicode in PowerShell

What I'm trying to achieve should be rather straightforward although PowerShell is trying to make it hard.I want to display the full path of files, some with Arabic, Chinese, Japanese and Russian...

View Article


WinSCP crashes with symbol like é, è, à when I run a batch

I have created a batch file to remove thousands of files on my server. I use WinSCP to connect to my server.The batch works fine, but when the filename has a UTF-8 symbol like é, è, à, the batch...

View Article

UTF-8 encoding not set for Spring integration tests running with Maven on...

Since I updated my Windows 10 and installed new OpenJDK 11.0.4 my Spring integration tests are not running anymore in the Maven context. Starting it within Eclipse is fine and still working but running...

View Article

Getting undefined characters in pieces section when trying to parse a...

Through various implementations on the net, I have implemented a Bendcode parser, and am trying to find the info hash of any input .torrent file. But, due to some problem, my parser gives correct...

View Article
Browsing all 1039 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>