| |

VerySource

 Forgot password?
 Register
Search
View: 1885|Reply: 7

java transcoding

[Copy link]

1

Threads

4

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-11 18:00:02
| Show all posts |Read mode
The character I submitted when I submitted the request was "I am Tan Jian"
Then I use inputstream on the server side to get the byte array value: {65,37,67,55,37,67,67,37,66,55,37,66,68,37,65,49}
After being converted into a string, it is: A%C7%CC%B7%BD%A1
Please help me, how can it be displayed on the server side: I’m Tan Jian
Thank you
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-11 18:15:01
| Show all posts
You can use the character stream to solve it.

Of course, it should also be possible to "decode" according to the principle of code conversion to get the correct Chinese code.
But I am not familiar with this, but there are some information, which is very easy to find on the Internet.
You go to search for the following: Java Chinese problem, Java programming Chinese character problem, Chinese character encoding, etc...
Good Luck! ^_^
Reply

Use magic Report

0

Threads

23

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2021-3-11 20:00:02
| Show all posts
Do you use inputstream to fetch form parameters on the server side?
Reply

Use magic Report

1

Threads

4

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2021-3-11 21:00:01
| Show all posts
Yes it is
Reply

Use magic Report

1

Threads

4

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2021-3-11 21:30:01
| Show all posts
Why can I use inputStream to get the form parameters, but when I use BUFFEREDREADER, the block stops there after submission. Cannot receive data.
Reply

Use magic Report

1

Threads

4

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2021-3-11 22:45:01
| Show all posts
I have solved it, haha,
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-11-25 18:23:20
| Show all posts
来看看,学习学习!!!!!
Reply

Use magic Report

0

Threads

1

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2022-9-14 14:16:30
| Show all posts
Byte2String
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list