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

Unable to Output Chinese Characters in CLion Using MSYS2 MinGW64 Despite...

I am developing a C++ application in CLion using MSYS2's MinGW64 compiler. My project involves outputting Chinese characters, but despite setting everything to UTF-8 (Global/File/Terminal encodings in...

View Article



check if javascript string is valid UTF-8

A user can copy and paste into a textarea html input and sometimes is pasting invalid UTF-8 characters, for example, a copy and paste from a rtf file that contains tabs.How can I check if a string is a...

View Article

Use FileOutputStream to Create a UTF-8 PDF File

I am using JasperReports and DynamicReports with this piece of java code to create a report in pdf format which contains utf-8 characters, the problem is generated pdf file does not contain utf-8...

View Article

PHP export CSV UTF-8 with BOM doesn't work

I have been stuck for days on exporting UTF-8 CSV with chinese characters that shows garbled text on Windows Excel. I am using PHP and have already added the BOM byte mark and tried encoding but no...

View Article

can I get the unicode value of a character or vise versa with php?

Is it possible to input a character and get the unicode value back? for example, i can put &#12103 in html to output "⽇", is it possible to give that character as an argument to a function and get...

View Article


UTF-8 safe equivalent of javascript's charCodeAt() in PHP

I need to be able to use ord() to get the same value as javascript's charCodeAt() function. The problem is that ord() doesn't support UTF8.How can I get Ą to translate to 260 in PHP? I've tried some...

View Article

Image may be NSFW.
Clik here to view.

Problem searching for Cyrillic characters

I have to work with the Cyrillic alphabet, I have problem with this alphabet in queries.When I'm looking for a specific word, some characters work like wildcards and are not considered at all in the...

View Article

Image may be NSFW.
Clik here to view.

Python 3.12 Write Chinese in Excel CSV - UTF-8-SIG not work

I am using Python 3.12.1 and upload it to AWS Lambda.What I am doing is to get data from a MySQL DB (with some Chinese text in it) and export to Excel CSV.Here is the code:# Copied from...

View Article


GORM/SQL query to ignore invalid utf-8 characters

I'm using GORM to query a database with rows containing invalid utf8 characters and getting errors when comparing values:db.Where("name ILIKE ?", value)ERROR: invalid byte sequence for encoding "UTF8":...

View Article


Reading utf-8 encoded files with fopen C

I have created a text file with following characters for testing utf-8 encoding:%gÁüijȐʨΘЋЮѦҗԘՔהڳضणணษ༒Ⴃᎃᡧᬐ⁜₪≸☺⛜⺟むヸ㒦㢒I also have written this program in C to open file and read it:#pragma...

View Article

C++20 UTF-8 String Literals With Octal Sequences

While porting legacy code to C++20, I replaced string literals (with expected UTF-8 encoded text) to UTF-8 string literals (the one prefixed with u8).Thereby, I ran into an issue with octal sequences...

View Article

Database collation in php with utf8 [duplicate]

I recently moved my database from one server to another, however when I moved it I noticed that it does not receive the accents or the ñ on the new server. Do you know how I can convert it to utf8 on...

View Article

How to uppercase/lowercase UTF-8 characters in C++?

Let's imagine I have a UTF-8 encoded std::string containing the following: óóand I'd like to convert it to the following:ÓÓIdeally I want the uppercase/lowercase approach I'm using to be generic across...

View Article


Convert escaped Unicode character back to actual character

I have the following value in a string variable in Java which has UTF-8 characters encoded like belowDodd\u2013Frankinstead ofDodd–Frank(Assume that I don't have control over how this value is assigned...

View Article

Image may be NSFW.
Clik here to view.

Html form set content type in requset header for charset utf-8

May be a basic question but I am struggling with it.Following it the HTML form on submitting the Content-Type:application/x-www-form-urlencoded without charset:utf-8.<!DOCTYPE html><html...

View Article


Par::Packer packaged scripts lose the ability to parse UTF-8 arguments from...

The answer provided in "Handling wide char values returned by Win32::API" can parse UTF-8 command line arguments on windows.But with Par Packer packaging, the parsing failed.If I save this codeuse...

View Article

I have a C++ code in which I am encountering some issues with printing strings

I have this code that I am trying to print some English text alongside text from a CSV file written in Bengali, but I am encountering issues with it.Enter an English word or phrase (or type 'exit' to...

View Article


Is there a way to iterate through std::u8string character by character?

I am facing difficulties while using C++20's std::u8string. However, I believe the problem also occurs with the older std::string.UTF-8 is a multi-byte sequence encoding method that can represent a...

View Article

Is modified UTF-8 handling in JNI::NewStringUTF changed in recent Android...

In earlier Android versions, JNI:NewStringUTF used to give an error when passed a valid UTF-8 string with 4 bytes encoding:input is not valid Modified UTF-8It was due to the fact that JNI/Java uses...

View Article

Image may be NSFW.
Clik here to view.

Dart Json UTF-8 Decode

I need to decode the data I receive as utf8. The codes are like thisFuture<Products> Get Product() async { var response = await http.get(url); var decodedJson = json.decode(response.body);...

View Article
Browsing all 295 articles
Browse latest View live




Latest Images