Amicuk Programming Answers

There is a question about encode String

-0001-11-30   Views:0


hello i find a question when i decode java program at linux(redhat 7.3 Valhalla) and J2SDK 1.4.1_02. when i want to encode a String from GB2312 to UTF-16BE, the String used CJK and alpha bet mixed. the String length is error and can not convert succe

i find a question when i decode java program at linux(redhat 7.3 Valhalla) and J2SDK 1.4.1_02.
when i want to encode a String from GB2312 to UTF-16BE, the String used CJK and alpha bet mixed. the String length is error and can not convert success!
from API documents, the string length when count the CJK character ,2 bytes count to 1,but there is 2! for example ,when i encode a CJK character to a UTF-16BE,when the string length is 1.then in the UTF-16BE should be 1,but there is not 1 but 2!!!:(
by the way ,when my code run at windows2000,it's right!! no error!
to everyone:what should i do ? is it a bug in j2sdk1.4.1_02?

The replay answer
There are multiple 16-bit Unicode encodings, i.e.,
with/without BOM (byte order mark).
Try these at a time, or confirm the unicode encoding used on an OS by the following.

Go to See the other 3 answers

There is a question about encode String

Category:DefaultRelease time:-0001-11-30Views:130

hello i find a question when i decode java program at linux(redhat 7.3 Valhalla) and J2SDK 1.4.1_02. when i want to encode a String from GB2312 to UTF-16BE, the String used CJK and alpha bet mixed. the String length is error and can not convert succe[More]

How to decode encoded string for javascript

Category:DefaultRelease time:-0001-11-30Views:130

This is encoded HTML code to be used at javascript function <div class=\"ProductDetail\"><div style=\"width:780px\">\r\n\t<div class=\"baslik\" style=\"margin: 0px; padding: 5px 10px; border-width: 5px 0px[More]

Converting Base64 encoded String to String object

Category:DefaultRelease time:-0001-11-30Views:130

Hi, Description: I have a Base64 encoded string and I am using this API for it, [] I am simply trying to convert it to a String object. Problem: When I try and write the Stri[More]

BIgMAth from base64 encoded string

Category:DefaultRelease time:-0001-11-30Views:130

I'm trying to create a BigInteger from a source that is a base64 encoded string. The BigInteger seems to only support radix up to 36. I have a couple of questions. 1) Why does BigInteger not support higher radix? 2) Anyone have any advice on how to m[More]

Unescaping URL Encoded Strings

Category:DefaultRelease time:-0001-11-30Views:130

Anyone know how to unescape URL encoded strings using XSL? I can use the translate() function to replace the + signs with spaces but the %3F and %3E style characters are causing problems. The escaped characters are in an XML doc. Any help would be ap[More]

How to convert a base64 encoded string to binary?

Category:DefaultRelease time:-0001-11-30Views:130

Hi, gurus, I want to convert a base64 encoded string (a image  which is read from a xml file) into a normal binary string and then upload to archive link. could you pls give me some hints on that? br. junthank you for your quick reply! my real requir[More]

Noob Question Re: Encoding to DVD

Category:DefaultRelease time:-0001-11-30Views:130

This is my first post in the adobe forums , so hello all! I've been trolling this, and numerous other sites, hoping to understand the basic process of editing -> CD creation. So here it begins...I am working on "work-out" video tape. The foot[More]

UIImage to Base64 Encoded String does not matched with PHP Encoded String

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have converted an image to base64 string using the following UIImage* pic = [UIImage imageNamed:@"closeBtn.png"];     NSData* pictureData = UIImagePNGRepresentation(pic);     [Base64 initialize];     NSString * encodedString = [Base64 enco[More]

Encoded String

Category:DefaultRelease time:-0001-11-30Views:130

Hi all I'm having problems with decoding an encoded String. The String i have looks like this: =?ISO-8859-1?Q?F=E4lt=F6m?= The code I use to try and decode the string looks like this: fileName = fileName.substring(fileName.indexOf("=?") + 2, fil[More]

Extended lookup field results in HTML encoded string in list view

Category:DefaultRelease time:-0001-11-30Views:130

Hello again, I have built an extended lookup field to provide picker support. For this I have custom field type and custom field control. Field type looks like this: <FieldType> <Field Name="TypeName">LookupWithPicker</Field> &[More]

SaxParser error  parsing xml encoded string

Category:DefaultRelease time:2015-10-11Views:130

I'm trying to parse an XML string with Java's SaxParser. The program fails at the end of an element or at the beginning of a new element. Is my XML string okay? <?xml version="1.0" encoding="utf-8" ?><DTYPE>OVL</DTYPE>[More]

Somehow Safari has lost its Reader plugin. Can somebody tell me how to put it back? I still have Adobe Reader on my computer but when I click on a pdf link Safari now uses Preview again instead of Reader. I already tried to download Reader and reinst [More]
We have LMS3.2 RME4.3.1 on solaris server Can LMS see/save if a HW added/removed to the box. and is it debends on syslog or SNMP to detect changes? What is the different between Reports-Report Generato-Inventory-"24 hoursinventory change report" [More]
Hi: I am trying to change the default paper size for Webi Rich Client 4.0.  In 3.x you made the changes to the defaultconfig.xml located in the path C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\classes\AppletConfig. In 4.0 I canu [More]
hi, i've had no issues using the annotate function for preview prior to my snow leopard upgrade. the most important function for me was the highlight text function for use in lectures. however, after upgrading, the text i highlight often highlights i [More]
iam trying to buy OS Lion to my Imac but i can not buy  because its saying Mac OSX 10.7 requires at least 2 GB of memomie and mine has 1 GB what can i do?If it's just a question of memory, you can buy and install more. It could also be that your iMac [More]
Hey Folks, I have a flex application that uses PHP services with the Zend framework. When I run it locally, the speed is great. My largest query returns data to my datagrid in 2-3 seconds. When I do run it locally, it is pulling from the production d [More]
I'm sure this is a simple answer, but would appreciate some help. I have designed a website where the background is a photograph, and the content of the website in a container in the middle of the screen. At the moment the container floats across the [More]
Hi, I'm working on Forms 6i and oracle 8.1.6 database in Client-Server Environment. In forms 6i how to use bean area button. I could able to write a bean program and save it in jar file. But when I attach that to 'bean area', it's not reflecting. Cou [More]
Hi All, I configured workflow mailer services in R12 instance and i checked the workflow services each and evey services are up and running.. while sending the TEST MAILER am not getting any mails. Checking with WF_NOTIFICATIONS table with particular [More]
Using CS3 on Mac G5, OS 10.4, and some Photoshop filters (e.g. Liquify) won't open, getting the message: "A file system I/O error has occurred." Some filters do open, but others fail. Have tried reinstalling CS3, trashing preferences, unlocked p [More]