Create String with Both Chinese and Latin alphabet

Good day everyone!
when I use "new String(byte[],"GBK")", if byte[] contains only Chinese or Latin alphabat, it works good.
But If Both Chinese and Latin alphabat are in the byte[], it does't work correctly, just returning a null String?
How can I do? Thanks for your help.

Are you positive you are using the correct encoding?
i.e., is gbk correct or might it be gb2312?I am sure, gbk work right for pure Chinese, but fails with bytes with both Chinese and Latin alphabet.

Similar Messages

  • Both Chinese and English in running header

    Hi-
    I have mixed Chinese and English in my book without any problems. However, I have one heading with both Chinese and English and the Chinese characters will not show in the running header, only crossed out squares.
    Got any ideas? Lars

    I'm back for a bit before I go out to walk the dog.
    I've been looking at the screen captures you provided, and I'm almost ceertain I know what the problem is. I don't have the LiSong font, though, so I'm not 100% sure.
    It looks to me like you are using a combination of the LiSong and Arno Pro, with your English text set in Arno Pro and the Chinese in LiSong. That's fine so far, it will probably also be OK if you are using LiSong for the English in the body text, too.
    In your running headers you've switched to an italic font, and, I think, therein lies the problem. I'm certainly not versed in typesetting Chinese, but my understanding is that there are no italics, and it looks to me like the entire running header is set in Arno Pro italic. Arno Pro does not have any Chinese glyphs, so you get the x-boxes. If you select the variable for the chines text and change the font to the LiSong I think they will go away and your correct glyphs will return.
    Also, it looks like you have the header repeating because you've got both the two character style variables and aparagraph style variable. You don't need the last one if you use the first two.
    And finally, and I probably should have mentioned this earlier, the character styles applied to this text don't necessarily need to do anything at all tothe formatting to work for defineing variables, as long as they have unique names. This allows you to name different parts of a paragraph without affecting the text in any way, but you can then apply separate formatting to your individual variables. In this particualr case, if I'm correct that you are using ArnoPro for the English and LiSong for the Chinese in the body text, it's probably appropriate to create a "Chinese" character style that includes the LiSong font (but not a size or color so you can apply it anywhere in your text and it will match the surrounding type except for the face), and an "English" style that is only a name.

  • How do  create a slide show with both video and photos in elements 12

    how do  create a slide show with both video and photos in elements 12

    Hi Brian
    You can batch process a set of prepared slides from Full Edit (see image) using:
    File >> Process Multiple Files
    In the PMF dialog you can choose filename, date, or description (caption)
    Make sure you choose a separate destination folder to your source folder so as tot to permanently overwrite your originals.
    Click image to view

  • Sending emails with both body and attachment to multiple recipients

    I have a requirement to send email with body and attachment to multiple recipients.
    Body of the email is a standard text. It is a proxy-to-mail scenario.
    Here is what I've done: (I'm using PI 7.11)
    One mapping from Source to Target structure (format of the attachment text file)
    Second mapping from Target Structure to Mail Package format.
    In the second mapping I'm concatenating the output of first step into "Content" of the Mail Package.
    "XIPAYLOAD" is the message protocol used.
    The "Keep attachments" option in the Mail adapter allows only to send "Content" as attachment or as body of the email.
    How to send an email with both content and text?
    The other problem is even with using ASMA, I can't send email to multiple recipients. I can only do CC and TO for 1 person each - a total of 2. Although I can resolve this by creating mailing lists, it is better if this can be addressed in PI.
    Thanks for any input you can provide!
    Edited by: crazylad on Jan 18, 2012 3:39 PM

    Thank you for your response Mikael.
    For the first question, I was able to find the solution in the following blog:
    XI Mail Adapter : Dynamically building attachment and message body content using a simple UDF
    (I just needed to search with the right set of key words )
    The key is to set the "Content Encoding" as "None" in the mail adapter. If this is not done, the mail will be sent with an attachment - untitled.bin containing both the mail body and the attachment text. Also, don't forget to check the "Keep Attachments" checkbox in the mail adapter.
    Multiple recipients could be added by separating the email IDs with a Comma. I have used ASMA to set the recipients.

  • Form report with both edit and column link

    hi experts,
    How can we create form report with both edit and column link. Ie, the form should have both the Edit link and column link. When we click on the edit link(in page1) it should go for the page2 and the page2 should display the corresponding row fields which should be editable. but when i click the column link it should bring me to the next page but the corresponding values of the column should not be editable.
    Regars,
    KK

    hi,
    Here i have achieved this by making the column link and page navigation.

  • How to Search for a Date in a string having both characters and date

    Hi ,
      I have a requirement to search DATE in the String having Both Characters and DATE . Please kindly let me know as early as possible.
    Regards
    Anil Kumar K

    Try to use SEARCH command with the pattern, making the pattern as fine as it can, like if you have your date in the format 02/23/2007, you can give
    SEARCH STRING FOR ' //'. (assuming the date has at least a single blank before it)
    WRITE:  SY-SUBRC UNDER 'SY-SUBRC',
    SY-FDPOS UNDER 'SY-FDPOS'.
    SY-FDPOS is set to offset of the string from which you can get the date value
    Refer here
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb33cc358411d1829f0000e829fbfe/frameset.htm
    It would have been better if there is something like UNIX "regular expression" matching in ABAP

  • Installing WRT54G with both Vista and XP OS Access

    First, I'm a new member of this forum. 
    I'm am preparing to update to a new Linksys WRT54G router.  We have one computer (HP 8100N) which has Microsoft Vista Home Premium installed; but our other 3 computers all use Windows XP SP 2.   The Linksys WRT54 G and Linksys Router are all plugged into the Vista machine ---with one other PC (Gateway) and 2 laptops (Toshiba and a Dell) all connecting wirelessly.
     RIght now things work ok --- but it's been 5 years since I've made any major changes.  However, I've experienced a rash of virus challenges lately and suspect somehow the router has been compromised; hence my desire to completely change it out.  At the same time, I'm not too excited about creating problems with the Vista and XP connectivity.  
    Any recommendations would be appreciated. Apology to Forum if this is posted twice; it appeared not to go through the first time.
    Thank you very much
    Krackatoa 3

    Chris:
    I have experience with both, Vista and XP. I use a MBP 15" 2GB RAM and I have had great success with both. I really no not overload my system. I have software to connect to the internet and full office 2007 Suite. So, mostly internet and productivity software. No major issues with either.
    Axel F.

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • I have an iPhone and iPad. I would like to get my husband an iPhone. Are we able to sync all devices and share info with both iPhones and the iPad, using a single email address?

    I have an iPhone and iPad. I would like to get my husband an iPhone. Are we able to sync all devices and share info with both iPhones and the iPad, using a single email address?

    Thanks for that. He is one of the last holdouts in IT so an email address for him would just mean I have 2 to check so that is what I am trying to avoid as we move into retirement:)

  • External hard drive use with both Mac and Windows

    I know that you can't use an iPod (through iTunes) with both Mac and Windows, but can you still use it as an external hard drive with both operating systems?

    Yes, if the iPod is in Windows format. Mac OS X can read and write Windows formatted iPods, but Windows can't access Mac formatted disks unless special software is installed.
    (9844)

  • Cisco ISE with both internal and External RADIUS Server

    Hi
    I have ISE 1.2 , I configured it as management monitor and PSN and it work fine
    I would like to know if I can integrate an external radius server and work with both internal and External RADIUS Server simultanously
    So some computer (groupe_A in active directory ) will continu to made radius authentication on the ISE internal radius and other computer (groupe_B in active directory) will made radius authentication on an external radius server
    I will like to know if it is possible to configure it and how I can do it ?
    Thanks in advance for your help
    Regards
    Blaise

    Cisco ISE can function both as a RADIUS server and as a RADIUS proxy server. When it acts as a proxy server, Cisco ISE receives authentication and accounting requests from the network access server (NAS) and forwards them to the external RADIUS server. Cisco ISE accepts the results of the requests and returns them to the NAS.
    Cisco ISE can simultaneously act as a proxy server to multiple external RADIUS servers. You can use the external RADIUS servers that you configure here in RADIUS server sequences. The External RADIUS Server page lists all the external RADIUS servers that you have defined in Cisco ISE. You can use the filter option to search for specific RADIUS servers based on the name or description, or both. In both simple and rule-based authentication policies, you can use the RADIUS server sequences to proxy the requests to a RADIUS server.
    The RADIUS server sequence strips the domain name from the RADIUS-Username attribute for RADIUS authentications. This domain stripping is not applicable for EAP authentications, which use the EAP-Identity attribute. The RADIUS proxy server obtains the username from the RADIUS-Username attribute and strips it from the character that you specify when you configure the RADIUS server sequence. For EAP authentications, the RADIUS proxy server obtains the username from the EAP-Identity attribute. EAP authentications that use the RADIUS server sequence will succeed only if the EAP-Identity and RADIUS-Username values are the same.

  • In Creative Cloud, does the $9.99/month Individual Photography plan come with BOTH Lightroom and Photoshop CC?

    In Creative Cloud, does the $9.99/month Individual Photography plan come with BOTH Lightroom and Photoshop CC?  It is not very clear on the home page.  It shows both and mentions both, but doesn't specifically say BOTH come with the monthly $9.99/month plan.  Can somebody clarify?

    Special Photography Plan
    http://helpx.adobe.com/photoshop/kb/differences-photoshop-creative-cloud-photography.html

  • How can I hook up an epson scanner (2480/2580) via USB/Firewire hub- APEBS and be able to operate the scanner with both laptop and desktop computer?

    My Artisan50 works in this configuration currently!

    You can't scan to a device connected to the base station's USB port. Devices other than computers with both USB and FireWire ports don't provide any crossover between the technologies unless specifically noted in their description.
    (58440)

  • I have a MacBookPro5,5 how do i connect it to my hdtv WITH BOTH AUDIO AND VIDEO? and where can i buy this cable(s)?

    i have a MacBookPro5,5 how do i connect it to my hdtv WITH BOTH AUDIO AND VIDEO? and where can i buy this cable(s)?

    thank you roger. i have attempted to connect my mbp now 3 times (all different ways with different cables purchased) but unfortunately no success. i understand that with me having an older mbp it can be a challenge. i have found this page http://www.wikihow.com/Connect-a-Macbook-to-a-TV but with my unsuccessful history, i have become skeptical. i will try your suggestion and let you know. thank you again.

  • My PC crashed with both CS6 and Lightroom 4. .

    My PC crashed with both CS6 and Lightroom 4. . .I purchased a Mac Pro.  Can I download the Mac versions of both programs and use my currenct serial numbers?

    You can with Lightroom, but not (as far as I know) with Photoshop. You ought to get in touch with Adobe's customer service people and see if you can "sidegrade" to Mac for a relatively small fee.
    Hal

Maybe you are looking for

  • XSL attribute question

    *<xsl:attribute name="xdofo:rowspancell-repeat-nextpage" xdofo:ctx="block">true</xsl:attribute>* Hello, can you provide me some example on how to use this code? i tried putting this code in a field in a table however it doesn't do any changes in my r

  • Need Low Resolution Camera App

    Hello, I have an Iphone and an Ipad. I need to be able to take pictures with both and save them to about 100-200Kb or less. I have found a few low res camera apps that will save only as low as 1MB (Procam and Camera+). Could you help me find a camera

  • Copying to diff sales area

    Changing sales area in the sales order while creating with reference to quotation. Client wants to create S.O in sales area 2000 / 20 / 00 with reference to quotation. Quotation is created in sales area 1000/20 /00 In S.O. ,  the sales area is copied

  • MAXIMUM availability with delay

    Hi guys, I am running a dataguard instance with cascaded log shipping currently in MAXIMUM AVAILABILITY mode. We have the following setup. Primary and standby in London and the cascaded standby ( ie. standby shipping logs further to another standby i

  • Bandwith management ASA 5505

              Dear All i have 16MB internet speed, i want to give inside interface in my ASA only 2MB to use could you please help me on how can i assign it ? ASA Version 8.2(5) hostname ConcordeASA enable password 8Ry2YjIyt7RRXU24 encrypted passwd 2KFQn