简体   繁体   中英

How can I replace a character from which I only have the unicode representation?

I have a string that when displayed in Notepad++ reads:

App.xEFxBFxBF35

The tocken EFxBFxBF seams to be some UTF entity that some applications cant handle (for me its redshift).

In Notepad the string reads as

App.35

How can I remove this entity from a string in c#?

EDIT

In visual studio the string shows in the debugger as

"App.\uffff35"

EDIT 1

At the end it turned out that the column needed to have its size doubled when I inserted non latin characters.

I created the redshift table by looking at the character length of the columns in sql server and directly used that number for the columns in redshift. That was for languages with latin characters, but not with non latin characters.

I found the different length by this redshift query.

select  bit_length('M');
select  bit_length('Б');
select  bit_length('Ö');

Gives back 8,16,16

You have two broad options:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM