Java Chinese problem

zhaozj2021-02-08  373

When processing Chinese is often new string (Str.GetBytes), "encoding mode 2"); here I understand 3 points: 1. The strings in Java are unicode to represent 2. String.getbytes ("encoding method") is a string represented by Unicode into a BYTE array 3 in the specified encoding. New string (byte [], "encoding mode"), is explained by specifying the encoding method to get a Unicode encoded string. And the usual garbled problem is because the transmitting string gives the Java program, and does not consider the actual coding type (GBK) of the read string, uniformly encodes a certain encoding method (such as 8859) so that we are in the program. You need to get GetBytes ("8859") to get the BYTE array of organizations according to the actual coding type, and then you can get the correct string in New String (Byte, "GBK"). The above is my understanding of Chinese issues. My statement is the correct key is that the three points I have listed above are not correct. I have been trapped for a long time, please expert guidance. Thank you, thank you. - ※ Source: · BBS Shuimu Tsinghua Station SmTH.org · [From: 162.105.183.50] Sender: Foolsgarden (with Shuimu Tsinghua Love), the letter area: Java title: Re: Ask a Java Chinese problem message station : BBS Shuimu Tsinghua Station (Sat Mar 10 13:59:34 2001) About this question, I have had research, your understanding is wrong, huh, huh [in the masterpiece of Goldstar (fireworks on the Daiwu River):]: When processing Chinese is often new string (Str.GetBytes), "Encoding Method 2") ;: Here I understand 3 points :: 1. The strings in Java are default encodings represented by Unicode: 2. String.getbytes ("encoding method") is a string that will be represented by Unicode as specified by the specified encoding mode: it is not wrong for a BYTE array, but it is this: 3. New string (Byte [], "encoding mode"), is explained by specifying a given Byte array as a specified encoding method,: Get a Unicode encoded string. This is wrong, it is also where you have a wrong conclusion: and the usual garbled problem is because:: When the string gives the Java program, there is no considering the actual coding type (GBK) of the read strings, unified, according to one: encoding The way (such as 8859) is encoded so that we need getBytes ("8859") to get getBytes ("8859") to get: Byte array in the actual coding type, then in New String (Byte, "GBK") can get correct : ................. - show the network ... ※ Source: · BBS Shuimu Tsinghua Station Smth.org · [From: 166.111.77.2] Sender: GoldStar (fireworks on the Daiwu River), the letter area: Java title: Re: Ask a Java Chinese problem message: BBS Shuimu Tsinghua Station (Sat Mar 10 14:02:25 2001) Oh, Great, please give points Bar.

Thank you, Thank you // Bow [In the masterpiece of FoolSgarden (and Shuimu Tsinghua Love):]: About this question, I have had research, your understanding is wrong, huh, huh: Default code: This is not wrong, but It was this: this is wrong, it is also the place where you have wrong conclusions - ※ Source: · BBS Shuimu Tsinghua Station Smth.org · [From: 162.105.183.50] Sender: Goldstar (Fireworks on the Danshe River), the letter area : Java Title: Re: Ask a question of Java Chinese issue: BBS Shuimu Tsinghua Station (Sat Mar 10 14:04:22 2001) What is the meaning of New String? // Bow mentioned in the masterpiece of Foolsgarden (and Shuimu Tsinghua):]: About this problem, I have had research, your understanding is wrong, huh, huh: Default code: This is not wrong, but it is like this. : This is wrong, it is also the place where you have wrong conclusions - ※ Source: · BBS Shuimu Tsinghua Station SmTH.org · [From: 162.105.183.50] Sender: Foolsgarden (with Shuimu Tsinghua Love), News District: Java Title: Re: Ask a question of Java Chinese issued a letter: BBS Shuimu Tsinghua Station (SAT Mar 10 14:05:30 2001) The structure of the class is an example of the masterpiece of Goldstar (fireworks on the Danshe River) Mentioned:]: What does new string mean? : // Bow - Xiucai ring ... ※ Source: · BBS Shuimu Tsinghua Station SmTH.org · [From: 166.111.77.2] Sender: Goldstar (Fireworks on the Danshe River), the letter area: Java Title: Re: Ask a question of Java Chinese issues: BBS Shuimu Tsinghua Station (Sat Mar 10 14:47:20 2001) No, I asked, New String (Byte [], "EncodeMethod"); specified encoding method and byte What is the relationship between arrays? [In the masterpiece of FoolSgarden (and Shuimu Tsinghua Love):]: The structure of the class is an example generation - ※ Source: · BBS Shuimu Tsinghua Station Smth.org · [from: 162.105.183.50] Sender: Foolsgarden (Tsing Wumu Tsinghua Love), the letter area: Java Title: Re: Ask a Java Chinese problem message station: BBS Shuimu Tsinghua Station (Sat Mar 10 14:54:02 2001) Byte What is the three-grade three say that the information in the computer is stored in binary storage. The designation of the encoding method is just a string class to decode how to decode the BYTE array. If the encoding is different, I believe SRING is also Different [In the masterpiece of Goldstar (fireworks on the Danshan River) mentioned:]: No, I asked, new string (byte [], "encodeMethod") ;: What is the code specified in the encoding method and a BYTE array? ? - 才 网 ... ※ Source: · BBS Shuimu Tsinghua Station Smth.org · [from: 166.111.77.2] Sender: Goldstar (Fireworks on the Danshe River), the letter area: Java Title: Re: ask a Java Chinese problem letter station: BBS Shuimu Tsinghua Station (Sat Mar 10 14:58:05 2001) Then I am 3dmation? Oh, I have little understanding, please give pointed to the story of // Bow [in FoolSgarden (and Shuimu Tsinghua Love), mention:】: Byte is what is the number of 2-based number: Of course The information in the computer is specified by binary storage, coding mode specified: just to construct the String class to decode how to decode the BYTE array: String:

转载请注明原文地址:https://www.9cbs.com/read-871.html

New Post(0)