Linked Questions

0 votes
1 answer
3k views

I'm not able to trim the unicode control character \u0085 in Java. How can you do this? String str = "\u0000\u001f\u0085 hi \n" PrintStream out = new PrintStream(System.out, true, "UTF-8"); out....
user1101293's user avatar
1 vote
1 answer
628 views

I see that the following line in Java deletes extended-Latin characters, which it should not do: String finalStr = value.replaceAll("\\P{Print}", " "); The \\P{Print} regexp is ...
gene b.'s user avatar
  • 12.6k
231 votes
16 answers
358k views

I have a Java String object. I need to extract only digits from it: "123-456-789" -> "123456789" Is there a library function that extracts only digits? Thanks for the answers. ...
user488469's user avatar
  • 2,313
229 votes
2 answers
150k views

I just lost part of my weekend because of this ... joker - zero width space. I just used some snippets from google groups and didn't recognize that there are doubled characters, because Idea (11) didn'...
biesior's user avatar
  • 55.8k
86 votes
8 answers
26k views

What is the fastest way to strip all non-printable characters from a String in Java? So far I've tried and measured on 138-byte, 131-character String: String's replaceAll() - slowest method 517009 ...
GreyCat's user avatar
  • 17.3k
25 votes
3 answers
45k views

I've already wasted a good amount of time dealing with strings (generated by some other source) and I found out that the problem was that the strings have non-printable characters. Today I am dealing ...
jmlopez's user avatar
  • 4,973
21 votes
4 answers
35k views

I'm facing the following scenario: I have an app that spits everything out to the STDOUT (simple company test) and I'm trying to JUnit this. My problem is, when I run the application, it returns me ...
Leonardo's user avatar
  • 3,201
11 votes
1 answer
25k views

My application is using Spring Integration for email polling from Outlook mailbox. As, it is receiving the String (email body)from an external system (Outlook), So I have no control over it. For ...
Sundararaj Govindasamy's user avatar
8 votes
4 answers
36k views

I am using the CoreNLP Neural Network Dependency Parser to parse some social media content. Unfortunately, the file contains characters which are, according to fileformat.info, not valid unicode ...
Yanick Nedderhoff's user avatar
1 vote
2 answers
3k views

I am uploading csv files using jdbc to teradata. Everything used to be fine, until recently I came across a csv file that had some weird characters and my code failed to upload . I opened the csv ...
Borat Sagddiev's user avatar
0 votes
2 answers
11k views

I saw similar question on Stackoverflow but none of them helped me to solve my issue. So, I am asking for help as I have tried to find out what is the reason behind the error I am getting but failed. ...
Wasi Ahmad's user avatar
  • 38.1k
4 votes
3 answers
3k views

In Java, I make the call: String chunkSizeAsString = responseString.split(DOUBLE_NEW_LINE)[1] .split(SINGLE_NEW_LINE)[0]; System.out.println("Trying to get integer value of '" + chunkSizeAsString ...
Tait's user avatar
  • 61
3 votes
3 answers
1k views

I try to read a .txt file which is basically a CSV file which is located in the Assets folder in Android. In the first row there is the number of row and columns of the file The rest is composed by ...
Marco Dagrada's user avatar
4 votes
2 answers
2k views

I have a string "\ufffd\ufffd hello\n" i have a code like this fun main() { val bs = "\ufffd\ufffd hello\n" println(bs) // �� hello } and i want to see "\...
vl4deee11's user avatar
0 votes
1 answer
3k views

A file consisting of special characters like ^A is stored in a byte array.how to detect these special characters and remove them?
Manisha 's user avatar

15 30 50 per page