24,344 questions
Advice
0
votes
2
replies
93
views
Force all character columns in a list of data frames to UTF-8 before uploading to a UTF-8-only database
I have a list of two tables in R.
Each data frame contains several character and numeric columns. One of the columns is a company name column (for example, Company_Name).
The target database only ...
3
votes
2
answers
206
views
Is `use source::encoding "ascii";` implied by `use v5.42;`?
According to the new source::encoding pragma's documentation,
use source::encoding 'ascii' is automatically enabled within the lexical scope of a use v5.41.0 or higher.
To me, this means that
use v5....
1
vote
1
answer
39
views
pandas.read_csv uses only utf-8 encoding for django file upload
I'm testing django using file uploads. Was facing a strange issue, when despide which encoding I choose, I'm always getting same error message that pandas is trying to decode with UTF-8
pd.read_csv(...
0
votes
1
answer
82
views
Gmail API draft creation: Subject with UTF-8 accents (é, è, …) shows as mojibake (“é”)
I’m creating Gmail drafts via the Gmail API from N8N. The draft works and is correctly attached to the threadId, but accented characters in the subject (like adhésion) are displayed incorrectly (adhé...
-1
votes
1
answer
42
views
How to pass special chars to nodemailer?
I want to pass a string to nodemailer so that it results in
=C2=A0
i tried to pass in both 'Â ' (the literal chars), "\xC2\xA0", etc.
But they always result in =C3=A9
A longer example in ...
0
votes
0
answers
88
views
@ not recognized by cobol z open editor WHY?
I am writing a Cobol program in Visual Studio Code using the STRING and UNSTRING statements but for some reason when trying to use string functions on email addresses the Cobol program will not ...
0
votes
0
answers
42
views
Email Encoding Issue [duplicate]
I send SMTP mail using PHP but there is an issue with the encoding.
$headers = "Content-type: text/html; charset=UTF-8\n";
Email message sent:
Where there's a dream
Email message received:
...
0
votes
1
answer
210
views
PgLoader Migrate data from SQL Server to PostgreSQL server got error with character "ñ/í/..."
I'm using pgloader to migrate data from SQL Server to PostgreSQL server, the database is huge and I can't export to CSVv due to special characters. So I migrate db to db directly, almost done but it ...
3
votes
1
answer
185
views
Delphi tstringlist encoding default
I have noticed recently (maybe a change in recent Delphi) that if I load an ASCII format txt file into a tstringlist, edit a line with file.lines[10]:='blah', and then save it again the file is now ...
1
vote
3
answers
294
views
How can I reliably print a Unicode character to the terminal from C? [closed]
I'm maintaining a program (a compiler for an obscure language) that takes input in the form of text files. Existing code reads these files and converts their various encodings into a sequence of ...
0
votes
0
answers
83
views
In Qt6, how do you set the encoding of a QTextStream to "EUC-JP"?
How do you set the encoding of a QTextStream to "EUC-JP" ?
The setEncoding function uses this enum:
class QStringConverter : public QStringConverterBase
{
public:
#endif // Qt 6 compat for ...
1
vote
0
answers
97
views
No-breaking space not correctly encoded in oracle via JDBC
I've a legacy application which is loading csv files and load them to oracle DB. One line contains the non breaking character which is correctly read by the app (I can see the byte value -96 for the ...
1
vote
0
answers
110
views
Pino Pretty not rendering accented characters correctly
I'm using pino with pino-pretty in a Node.js + TypeScript project, and I'm logging strings with accented characters (like ç, ã, é, etc.).
Example:
logger.info("Olá, Lucas! Teste de acentuação: ç, ...
0
votes
0
answers
87
views
Error using python on z/OS - no encoding declared
I'm trying to write a python script under z/OS, using IBM Open Enterprise SDK for Python 3.13.
I wrote the code under TSO OMVS and I got the following error trying to execute the code:
SyntaxError: ...
1
vote
1
answer
64
views
Encoding in R script
I am using the foreign package to read in 8 SPSS files. When they are read in some are re-encoded with UTF-8 and some with CP1252.
In my R script I want to compare an SPSS level with a piece of text. ...
2
votes
1
answer
152
views
How to fix broken German special characters when reading CSV file?
I am trying to load a German CSV file into R on Fedora Linux 42, but the region names containing special characters (like u-umlaut, o-umlaut, eszett) are not rendered correctly.
Here's a simplified ...
1
vote
1
answer
114
views
How to parse ASN.1 custom tags using Golang encoding/asn1?
I have a struct:
type V struct {
S int `asn1:"tag:1"`
}
Then I ASN.1 marshal this struct:
val := V{S: 12}
b, _ := asn1.Marshal(val)
Using dumpasn1 I got correct ASN.1:
0 3: ...
1
vote
1
answer
179
views
using std::filesystem with g++ 12.1.0 raises "Cannot convert character sequence: Invalid or incomplete multibyte or wide character"
I'm upgrading my compiler from g++ 8.2.0 to 12.1.0.
I have some legacy code using std::filesystem that starts failing with this upgrade.
I isolated the problem in a MCVE below. The code is supposed to ...
0
votes
1
answer
78
views
Is there a way to decode a specific string in Python? [closed]
I'm using Beautiful Soup to scrape Reddit. After scraping, I get some amount of encoding in the final text after finding the paragraph tag in the HTMl code and taking it's text.
# finds all paragraphs ...
0
votes
0
answers
45
views
Comparing strings received as bytes
I'm running a python script that receives data over a TCP connection. This connection can send multiple messages that consists of multiple variables which have multiple data types. When a string is ...
0
votes
1
answer
114
views
Can't find proper encoding to open old ascii-encoded DBF files with Slovak, Czech, and German special characters
I'm working with a few old DBF files that contain special characters from the Slovak, Czech, and German alphabets (e.g., š, č, ř, ä, ö, ü). Both Python libraries dbfread and dbf indicate that the ...
0
votes
1
answer
80
views
Produce a slash in base64 string to test base64url encoding
I have a unit test for a Base64 URL safe function that I want to make sure that it is properly handling three things:
Replaces + with -
Replaces / with _
Trims = at end
I want my unit test to have a ...
0
votes
1
answer
68
views
Cyrillic str encoded in Mysql inside PHP script [closed]
I have the string "тест123" in Cyrillic and am executing a MySQL query with it inside a PHP script.
However, the string in the query gets encoded and instead of "test123", it ...
0
votes
0
answers
37
views
Enforce UTF-8 in Build Result of Sublime Text
When I run a standalone Javascript using nodejs in the Sublime Text Editor:
console.log("Hellø World!");
The output is displayed in the Build Result pane:
Hellø World!
[Finished in 54ms]
...
-1
votes
2
answers
102
views
Replacing literal '\uxxxx' in string with corresponding unicode character
I don't want to convert things like \n \r so I can't use unicode_escape directly.
But my code is very slow now, is there any better way?
def only_transform_backslash_u(content):
...