Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Browsing latest articles
Browse All 290 View Live

re.findall() in python for escape sequences [duplicate]

I was trying to find out all escape sequences in a file but failed. This is a minimal reproducible example:Code:import rematches = re.findall(r'"(\\\d+)+"', r'"\123\124\125"')print(matches)Expected...

View Article



UTF8 to CP1255 conversion

I am trying to convert a UTF-8 string to CP1255 (Hebrew)I have tried running the following (I'm using detect_encoding because some of my inputs are not UTF-8):foreach($param as $key=>$value){...

View Article

C++ ShiftJIS to UTF8 conversion

I need to convert Doublebyte characters. In my special case Shift-Jis into something better to handle, preferably with standard C++.the following Question ended up without a workaround:Doublebyte...

View Article

Jasper Report not rendering special characters

Currently working on dispatch note template,having a problem with displaying special symbols (š,č,ť,ž,ň, and so on - slovak localization) from resource bundle (.properties)... encoding is initialized...

View Article

HTTP headers encoding/decoding in Java

A custom HTTP header is being passed to a Servlet application for authentication purposes. The header value must be able to contain accents and other non-ASCII characters, so must be in a certain...

View Article


Converting a binary to a string variable in Polars (Python Library) with...

I'm having trouble manipulating a dataset in Python which has non-UTF-8 characters. The strings are imported as a binary. But I am having issues converting the binary columns to strings where a cell...

View Article

Is the gcc compiler that is responsible for storing ( in the executable )...

I'm on an Ubuntu system and I wrote this simple program :#include <unistd.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>int main( void ){ char utf8_arr[] =...

View Article

How to convert UTF-16 format string to UTF-8 format in C++? [duplicate]

I'm working on displaying text contents using the Cairo library, where I'm provided with retrieved text from a PSD file. The text is encoded in UTF-16 format, but Cairo only supports UTF-8. When...

View Article


Java. Does file-encoding affect file-comparison at the level of pure bytes?

I'm using the following to compare the content of two supposedly identical files. I've read that—at least with respect to textual files, like TXT or HTML—the encoding of a file affects how a file's...

View Article


Ghostscript (ps2pdf) Not Handling UTF-8 Input File

I'm trying to use ps2pdf to convert a Postscript file to PDF, but the Postscript file has a UTF-8 character in it which is not rendered properly.We have a website with a database, where users can enter...

View Article

how to decode to utf-8 in java android studio in java language API response

Chinese character was not showing properly in response but everything is showingi have tried different on plateform but could not resolve this issuesthis issue is generated in android studioactually i...

View Article

How to apply CSS to musical accidentals?

This is in a small html file:<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">...<p>html code: C&#9839; C&#9837; C&#9838; or paste: sharp (C♯), flat (C♭),...

View Article

Using Javascript's atob to decode base64 doesn't properly decode utf-8 strings

I'm using the Javascript window.atob() function to decode a base64-encoded string (specifically the base64-encoded content from the GitHub API). Problem is I'm getting ASCII-encoded characters back...

View Article


Does UTF-8 content could be malformed in Java

I am trying to create a test case in java to testdecoder.onMalformedInput(CodingErrorAction.REPLACE);decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);I need some character in UTF_8 Charset...

View Article

Base64.Decoder returning foreign characters

I am building a small application to turn the text in a text file to Base64 then back to normal. The decoded text always returns some Chinese characters in the beginning of the first line. public...

View Article


Python json.dumps of a tuple with some UTF-8 characters, either fails or...

On my server, a Python script gets data from a database as a tuple. Then the script converts the tuple to a string (using json.dumps()) to be passed to the JavaScript script in the user's browser.The...

View Article

Convert UTF-16 to UTF-8 and remove BOM?

We have a data entry person who encoded in UTF-16 on Windows and would like to have utf-8 and remove the BOM. The utf-8 conversion works but BOM is still there. How would I remove this? This is what I...

View Article


VB.NET Convert Unicode 8 (UTF8) into Regular American ASCII

I have thing problem here is the debugging outputs"?uƒn74tn5187r&key=6e6e0936c4e6c48be56a72eba8964df0"should be"?u=83n74tn5187r&key=6e6e0936c4e6c48be56a72eba8964df0"I have tried solution from...

View Article

Image may be NSFW.
Clik here to view.

Replacement character in text [duplicate]

This application is created in NodeJs (ElectronJs)There is a problem with the text in html, instead of spaces/indents, black diamonds with a question mark inside (replacement character) appearHere are...

View Article

Thymeleaf PDF with Arabic text shows blank

I am using Thymeleaf version 3.1.2.RELEASE and flying-saucer-pdf version 9.3.1 to generate PDF from a JavaFX application. I have the following template.html:<html xmlns:th="http://www.thymeleaf.org"...

View Article

How to create simpliest PHP Get API with UTF-8 support?

How to create simplest (less lines of code, less strange words) PHP Get API (so any program made in .Net C# could call URL like...

View Article


Changing the “locale preferred encoding” in Python 3 in Windows

I'm using Python 3 (recently switched from Python 2). My code usually runs on Linux but also sometimes (not often) on Windows. According to Python 3 documentation for open(), the default encoding for a...

View Article


How to convert a u8 to a char in Rust?

I have a function that builds a string based off u8 values in an array. If the u8 is 0 or 10, then I push a specific character. Otherwise, I want to push on the number itself. My issue is that when I...

View Article

remove non-UTF-8 characters from xml with declared encoding=utf-8 - Java

I have to handle this scenario in Java:I'm getting a request in XML form from a client with declared encoding=utf-8. Unfortunately it may contain not utf-8 characters and there is a requirement to...

View Article

Image may be NSFW.
Clik here to view.

Html2canvas image capturing issue with UTF-8 characters

I want to capture my webpage, In order to this I find html2canvas, when I use as shown below ,my UTF-8 (persian) characters get in trouble and this direction destroyed as you see.HTML:<div...

View Article


C# string length validation for SQL Server UTF-8 collation columns

I'm struggling with communicating length validation issues in my C# app to business users for string values that are stored in SQL Server using columns with UTF-8 collation...

View Article

Convert zero-padded bytes to UTF-8 string

I'm unpacking several structs that contain 's' type fields from C. The fields contain zero-padded UTF-8 strings handled by strncpy in the C code (note this function's vestigial behaviour). If I decode...

View Article

How to overload functions string.byte and string.char to support Unicode UTF-8?

I have custom functions utf8Char (decimal) and utf8Byte(char).How can I overload the functions string.char(...) and string.byte(s, i, j) in Lua?Here is an example function what I mean:local...

View Article

python requests.get() returns improperly decoded text instead of UTF-8?

When the content-type of the server is 'Content-Type:text/html', requests.get() returns improperly encoded data.However, if we have the content type explicitly as 'Content-Type:text/html;...

View Article



Image may be NSFW.
Clik here to view.

Losing devnagari text display when Migrating from utf8 to utf8mb4

Currently I have database with mysql(v 5.7.44) tables with collation utf8_unicode_ciWhen I import it to mysql 8.0.31, collation get changed to utf8mb3_unicode_ciAfter reading many posts regarding this,...

View Article
Browsing latest articles
Browse All 290 View Live


Latest Images