Webapp authentication failed when using chinese characters as login name

Hello,
I have tried webapp authentication on tomcat and oc4j, via BASIC and FORM auth-method. All failed when the login name contains non-English characters. It seems an encoding issue, therefore, I also tried to change the page encoding of the login form to utf-8. None of the above is successful. Is there any solution? I really appreciate any help!
Thanks in advance!!

Enterprise support:
Call enterprise support  (866) 752-7753  to create  a case ID number
Get an account at
http://developer.apple.com/  then submit a bug report to http://bugreporter.apple.com/
Once on the bugreporter page,
   -- click on New icon
   -- See if you need to attach a log file or log files, clicking on Show instructions for gathering logs.  Scroll down to find the area or application that matches the problem.
   -- etc.
Developers:
"Submitting Bugs and Feedback
Your feedback goes a long way towards making our products even better. With Apple Bug Reporter, you can submit bug reports or request enhancements to APIs and developer tools."
https://developer.apple.com/bug-reporting/

Similar Messages

  • 802.1X PEAP fails when using special characters in login

    I am using MS AD & NPS for 802.1X Enterprise authentication with PEAP (no client certificate - MS-CHAPv2 user credentials for login). This works fine for iOS devices on 8.1 (iPhone 5 and iPad mini) and 6.1.6 (iPhone 3GS) when the user has standard "English" ASCII characters in the username and password.
    However, when I introduce Unicode special accented characters in the login name or password such as French é/ù or Spanish ñ then after accepting the server cert authentication fails with "Incorrect username or password for <WLAN name>". Windows 7 and CentOS 6.5 laptops have no problem authenticating to the same setup with either "English" credentials or ones with special accented characters. I also tried an old iPod touch on ancient software version and that fails, so its not something recently introduced.
    I tried using a different access point (TP-Link instead of Ruckus) and had exactly the same issue, so highly unlikely this is an AP issue.
    Then I setup FreeRadius with and see exactly the same issue, so its highly unlikely to be a MS AD/NPS issue.
    When comparing a working/failed authentication Wireshark packet capture on the NPS server, I see the failed attempt is missing the last 4 packets in the authentication exchange. The last packet sent is an Access-Challenge from the NPS server and no response from the iOS device, so the NPS server never even sends an Access-Reject. The iOS device appears to have decided it can't resolve the special characters and terminates the authentication attempt.
    To me this seems to be an Apple iOS software deficiency when using Unicode special characters in the username or password for 801.2X authentication?

    Enterprise support:
    Call enterprise support  (866) 752-7753  to create  a case ID number
    Get an account at
    http://developer.apple.com/  then submit a bug report to http://bugreporter.apple.com/
    Once on the bugreporter page,
       -- click on New icon
       -- See if you need to attach a log file or log files, clicking on Show instructions for gathering logs.  Scroll down to find the area or application that matches the problem.
       -- etc.
    Developers:
    "Submitting Bugs and Feedback
    Your feedback goes a long way towards making our products even better. With Apple Bug Reporter, you can submit bug reports or request enhancements to APIs and developer tools."
    https://developer.apple.com/bug-reporting/

  • Authentication failes when using the ... -menu - otherwise it does work.

    Hi there,
    I use DSL and PPPoE to connect to the internet - nothing fancy at all.
    Yeterday I moved on to my new MacBook Pro, running 10.4.5
    and the migration went fine. I could connect to the internet allright.
    Today however I cannot connect to the Internet using the menu item "<...>" and "Connect". I will get an "Authentication failed" error.
    If I use Opening Internet Connect instead, with the same data and press the Connect button here, it worked so far every single time.
    Why is this? And how can I make ik work also for the menu-connect, that I have been using for years on my old machine?
    Any help is very much appreciated.
    Cheers, Thorsten.
    MacBook Pro, 2.0 Ghz   Mac OS X (10.4.5)  

    Similar problem with me. When why Mac is in sleeping mode and it wakes up I have to authentificate my standard account (which is not with admin rights) using my Admin user name and password.
    I never had this with 10.4.4.
    I have no idea what's different - or is it a new bug with 10.4.5?

  • NeoSpeech is failing when using Chinese

    I have Captivate 8 installed on Windows 7 Professional. I have been using the NeoSpeech Function quite a bit, and it has been incredibly useful until now. I recently translated my project to Chinese (simplified) and when I put the Chinese text into NeoSpeech (With the voice "yumi") It says "Error occurred while generating Text to Speech Audio for Slide 1, Slide 2, Slide 3, etc. ) It will however complete the Audio Generation with other voices that don't pronounce Chinese well at all.

    I have Captivate 8 installed on Windows 7 Professional. I have been using the NeoSpeech Function quite a bit, and it has been incredibly useful until now. I recently translated my project to Chinese (simplified) and when I put the Chinese text into NeoSpeech (With the voice "yumi") It says "Error occurred while generating Text to Speech Audio for Slide 1, Slide 2, Slide 3, etc. ) It will however complete the Audio Generation with other voices that don't pronounce Chinese well at all.

  • Report Generation Toolkit using Chinese Characters

    I am trying to use the Report Generation Toolkit for Microsoft Office under LabVIEW 8.0.  I would like to use Chinese characters for the headings of the columns using a 2D array of the headings and the Excel Easy Table.  When I generate the report, the text of the headings appears to be jumbled and not encoding correctly.
    For example:
    仪器编号 becomes êNhV÷S
    采前初重(g) becomes Ç‘MRRÍ‘ÿg
    Any insights here? Thanks

    Hi,
    what you describe reminded me of a bug fix in the Report Generation Toolkit 2012 :
    339092
    Using the "Append Table to Report" VI to add strings of Cyrillic font to a table in an MS Word report results in gibberish being added to the report.
    http://digital.ni.com/public.nsf/allkb/09D6DE5170B3C0BD86257A2B004CFD20
    I know that Cyrillic and Chinese characters are different but they are often confronted to the same problems...
    Aurelie

  • Using chinese characters in struts-config.xml

    Hi
    i am developing an application in Chinese language where i need to create all the urls in the Chinese language. i am using struts 1.3.5.can anyone tell me is it possible to use Chinese characters in struts-config.xml action mappings? i tried but it is not working. is there ant way really?
    Regards,
    A.

    Don't know about struts specifically, but for Chinese URLs to work you would need to convert to punycode at some point, to comply with IDNA: http://en.wikipedia.org/wiki/Punycode
    Are you doing that?

  • How to solve the error message "Could not activate cellular data network: PDP authentication failure"when using 3g or gPRS on safari with an iphone 4 and latest software updates

    Please can someone help me to solve the error message "Could not activate cellular data network: PDP authentication failure"when using 3G or GPRS on safari with an iphone 4GS and latest software updates. I have tried resetting the network and phone settings. I have restored the factory settings on itunes and still the problem persists.

    All iPhones sold in Japan are sold carrier locked and cannot be officially unlocked by the carrier. If you unlocked it, it was by unauthorized means (hacked), and support cannot be given to you in this forum.
    Hacked iPhones are subject to countermeasures by Apple, particularly when updating the firmware. It is likely permanently re-locked or permanently disabled.
    Message was edited by: modular747

  • [svn:bz-4.x] 16147: Fix a few more regression tests on the 4. x branch that were failing when using Spring integration.

    Revision: 16147
    Revision: 16147
    Author:   [email protected]
    Date:     2010-05-17 06:18:38 -0700 (Mon, 17 May 2010)
    Log Message:
    Fix a few more regression tests on the 4.x branch that were failing when using Spring integration.
    Modified Paths:
        blazeds/branches/4.x/qa/apps/qa-regress/WEB-INF/src/runtimeconfig/remoteobjects/ROMessage Destination.java
        blazeds/branches/4.x/qa/apps/qa-regress/WEB-INF/src/runtimeconfig/remoteobjects/RuntimeCo nfigurator.java
        blazeds/branches/4.x/qa/resources/webtier/flex_sdk_4/flex-config.xml

    Well heres my story. I tried kde4 from extra the last 3 weeks and I like it. I have used xfce for the past 3 years, previous to that gnome. Tried kde but never really liked it. Now I am only using workspace, base, mutimedia and graphics.
    Here is what I like.
    1- Dolphin, awesome I have used thunar a while and it is great but I love splitview, and fish for ssh (which has been around a while I know), and the ability to mount other partitions on my hdd with a click no fstab entry or nothin'.
    2-Pretty, I've used xfce with built in compositor an love the snappiness. But I like desktop grid with kde4 and flipswitch. Compiz-fusion is cool but I prefer not to use I'll take what the DE gives. Plasmoid are cool too.
    3- Gwenview is nice too. Use to use gqview, but thumnails are nice.
    Looking forward to or lacking
    1- Keyboard shortcuts, Yes xbindkeys is there but if I have a DE I want it to do it. They just don't work now.
    2- kde4 has windows specific settings, but I can't set the opacity for particular windows , doesn't work.
    3- Ram of course is much higher in kde4, but maybe I'm getting old I just don't care as much.

  • Get message, "certificate authentication failed" when downloading

    Get message "certificate authentication failed" when downloading Adobe flash

    Download and run the offline installers
    Flash Player: http://helpx.adobe.com/content/help/en/flash-player/kb/installation-problems-flash-player- windows.html#main-pars_header
    Adobe Reader: http://get.adobe.com/reader/enterprise/

  • Using chinese characters/font in titles

    I am trying to use Chinese characters for subtitles in my video and a few of the characters turn into boxes?  I am a Mac user and have the proper Chinese keyboard selected.... which works fine in Word.  Please help!!!  I think there is something to do with the available fonts in premiere pro, something about the font being unicode vs. non-unicode.

    Try creating these in Photoshop, then import the PSDs into PP.

  • IFCORE-1565: The Dgraph could fail when using a relevance ranking strategy.

    Hi,
    I just saw the release notes for Endeca 6.2.2 and read this bug:
    IFCORE-1565: The Dgraph could fail when using a relevance ranking strategy.
    Is there someone who could provide some more information on this bug? What is it and when does it occur? Reading the word 'could' would suggest a kind of unpredictability?
    Thanks,
    Maarten

    The known trigger for the bug was doing relrank on a query that contained multiple text searches.

  • Authentication Failed: User xelsysadm javax.security.auth.login.FailedLogin

    Hi All,
    I have an critical ssue to be solved on Production environemt :(,
    we have oim installed on cluster in production(OIM11g installed on server ), the configuration is as mentioned below
    cluster 1--oim1,soa1--server1--holds admin server
    cluster 2--oim2,soa2--server2--managed server and no admin server
    This instance was working fine, we had to restart the server machine for some reason and i am not able to start OIM server :( after that.
    following is the exception i get when i start the OIM server , Please help :(
    2011-05-13T13:42:29.585+05:30] [wls_oim1] [NOTIFICATION] [] [oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] ADFApplicationLifecycleListener.preStop. Cleaning up Application caches.
    [2011-05-13T13:42:29.585+05:30] [wls_oim1] [NOTIFICATION] [] [oracle.adf.share.config.ADFConfigFactory] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] Clean up Application Caches
    [2011-05-13T13:42:29.585+05:30] [wls_oim1] [NOTIFICATION] [] [oracle.adf.share.config.ADFConfigFactory] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] ADFConfigFactory.cleanUpApplicationCaches. Calling ADF Config instance implementation: class oracle.adf.share.config.MDSConfigImpl.releaseResources()
    [2011-05-13T13:42:29.600+05:30] [wls_oim1] [NOTIFICATION] [] [oracle.adf.share.config.ADFConfigFactory] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] ADFConfigFactory.cleanUpApplicationCaches. Calling ADF Config instance implementation: class oracle.adf.share.config.MDSConfigImpl.releaseResources()
    [2011-05-13T13:42:29.600+05:30] [wls_oim1] [NOTIFICATION] [] [oracle.adf.share.config.ADFConfigFactory] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] ADFConfigFactory.cleanUpApplicationCaches. Calling ADF Config instance implementation: class oracle.adf.share.config.MDSConfigImpl.releaseResources()
    [2011-05-13T13:42:29.600+05:30] [wls_oim1] [NOTIFICATION] [] [oracle.adf.share.config.ADFConfigFactory] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] ADFConfigFactory.cleanUpApplicationCaches. Calling ADF Config instance implementation: class oracle.adf.share.config.MDSConfigImpl.releaseResources()
    [*2011-05-13T13:42:30.193+05:30] [wls_oim1] [ERROR] [] [OIM Authenticator] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] Error while retrieving user xelsysadm*
    *[2011-05-13T13:42:30.224+05:30] [wls_oim1] [ERROR] [IAM-0020011] [oracle.iam.platform.auth.client] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IzcQVWHFo2w6wFNa6G1DhbE300075k,0] [APP: oim#11.1.1.3.0] Login Exception encountered when trying to login as admin {0}[[*
    *javax.security.auth.login.LoginException: javax.security.auth.login.LoginException: java.lang.SecurityException: [Security:090304]Authentication Failed: User xelsysadm javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User xelsysadm denied*
    at weblogic.security.auth.login.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:684)
    at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
    at Thor.API.Security.LoginHandler.weblogicLoginHandler.login(weblogicLoginHandler.java:62)
    at oracle.iam.platform.OIMClient.login(OIMClient.java:134)
    at oracle.iam.platform.OIMClient.login(OIMClient.java:114)
    at oracle.iam.platform.OIMInternalClient.loginAsAdmin(OIMInternalClient.java:69)
    at oracle.iam.scheduler.impl.util.SchedulerUtil.getSchedulerService(SchedulerUtil.java:735)
    at oracle.iam.scheduler.webapp.SchedulerStartupServlet.resetRunningJobStatus(SchedulerStartupServlet.java:247)
    at oracle.iam.scheduler.webapp.SchedulerStartupServlet.stopScheduler(SchedulerStartupServlet.java:123)
    at oracle.iam.scheduler.webapp.SchedulerStartupServlet.destroy(SchedulerStartupServlet.java:261)
    at weblogic.servlet.internal.StubSecurityHelper$ServletDestroyAction.run(StubSecurityHelper.java:303)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.destroyServlet(StubSecurityHelper.java:81)
    at weblogic.servlet.internal.StubLifecycleHelper.destroyOneInstance(StubLifecycleHelper.java:144)
    at weblogic.servlet.internal.StubLifecycleHelper.destroy(StubLifecycleHelper.java:134)
    at weblogic.servlet.internal.ServletStubImpl.destroy(ServletStubImpl.java:438)
    at weblogic.servlet.internal.WebAppServletContext.destroyServlets(WebAppServletContext.java:3232)
    at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3192)
    at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:241)
    at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:461)
    at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1540)
    at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:513)
    at weblogic.application.internal.flow.ModuleStateDriver$2.previous(ModuleStateDriver.java:389)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:167)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:160)
    at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:141)
    at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:207)
    at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:261)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$2.previous(DeploymentCallbackFlow.java:538)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:167)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:160)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:182)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:175)
    at weblogic.application.internal.BaseDeployment$2.previous(BaseDeployment.java:1281)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:167)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:160)
    at weblogic.application.internal.BaseDeployment.deactivate(BaseDeployment.java:453)
    at weblogic.application.internal.EarDeployment.deactivate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.deactivate(DeploymentStateChecker.java:199)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.deactivate(AppContainerInvoker.java:98)
    at weblogic.deploy.internal.targetserver.BasicDeployment.deactivate(BasicDeployment.java:263)
    at weblogic.deploy.internal.targetserver.BasicDeployment.deactivateFromServerLifecycle(BasicDeployment.java:458)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doDeactivate(DeploymentAdapter.java:74)
    at weblogic.management.deploy.internal.DeploymentAdapter.deactivate(DeploymentAdapter.java:215)
    at weblogic.management.deploy.internal.AppTransition$6.transitionApp(AppTransition.java:67)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deactivate(ConfiguredDeployments.java:199)
    at weblogic.management.deploy.internal.ConfiguredDeployments.undeploy(ConfiguredDeployments.java:191)
    at weblogic.management.deploy.internal.DeploymentServerService.shutdownApps(DeploymentServerService.java:195)
    at weblogic.management.deploy.internal.DeploymentServerService.shutdownHelper(DeploymentServerService.java:127)
    at weblogic.application.ApplicationShutdownService.stop(ApplicationShutdownService.java:106)
    at weblogic.t3.srvr.ServerServicesManager.stopInternal(ServerServicesManager.java:495)
    at weblogic.t3.srvr.ServerServicesManager.stop(ServerServicesManager.java:316)
    at weblogic.t3.srvr.T3Srvr.shutdown(T3Srvr.java:1036)
    at weblogic.t3.srvr.T3Srvr.gracefulShutdown(T3Srvr.java:939)
    at weblogic.t3.srvr.GracefulShutdownRequest.run(GracefulShutdownRequest.java:41)
    at weblogic.work.ContextWrap.run(ContextWrap.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Thanks in advance

    Agreed with all above pointers.
    I think you have to raise SR with oracle, because it is prod environment.
    If you still want to do some R&D.
    1. Also check this URL might help, but not sure.
    http://download.oracle.com/docs/cd/E21764_01/doc.1111/e14308/handlinglcm.htm#CIAJCEEF
    http://download.oracle.com/docs/cd/E21764_01/doc.1111/e14308/handlinglcm.htm#CIAEFAGF
    2. Restart all servers (along with Admin server and DB).

  • Authentication Failed when trying to use Save As in the Firefox

    Hi,
    user tries to save concurrent request output (.txt) and gets 'Authentication Failed.' message in the file created.
    Same thing if he wants to see page source...
    I ran through firefox about:config, and found nothing special.
    browser.cache.disk_cache_ssl is disabled...
    Any ideas?
    Thanks!
    Kind regards,
    Kris

    Hi Carlo,
    thanks, tried all possible combinations of that property, but it did't work as hoped...
    When a page is loaded, it is cached so it doesn't need to be downloaded to be redisplayed. If the page changes after a previous visit, you may want to redownload it anyway to get the updated page. This preference controls how often to check for a newer version of a cached page.
    0-Check for a new version of a page once per session (a session starts when the first application window opens and ends when the last application window closes).
    1-Check for a new version every time a page is loaded.
    2-Never check for a new version - always load the page from cache.
    3-Check for a new version when the page is out of date. (Default)
    Found one workaround, but not totally ok:
    Right mouse click -> Select All
    Right mouse click -> View Selection Source
    File -> Save
    But there are HTML tags in saved file, and users don't want to edit the file...
    Regards,
    Kris
    Edited by: kristjan on Jan 24, 2013 8:49 AM

  • Scp works when logging with my user id but fails when using another one

    Hello all:
    I wrote a script that uses scp to transfer specific local files to a server. The script takes the user id and password and pass them as scp's parameters for authentication.
    Everything works fine when I uses my own user id to test the script but it fails when I used another id (with ligitimate password) to do the same thing.
    I suspect it's a privilege issue. Both ids belong to the same group. Where should I look to fingure this out?
    Thanks,
    John

    SCP is part of SSH. SSH requires the exchange of authorization keys to prevent man-in-the-middle attacks.
    When you log in the first time you may see a prompt like:
    RSA key fingerprint is 98:2e:d7:e0:de:9f:ac:67:28:d2:42:2e:37:16:58:45.
    Are you sure you want to continue connecting (yes/no)?
    This might be where your script fails. Since it prompts only the first time, you may just have to do one interactive SSH login to create an entry in ~/.ssh/known_hosts
    Or setup User equivalence to omit the exchange of passwords.
    You may find the following interesting:
    Oracle Linux 5 Howto: Installing and using cURL with support for SCP and SFTP
    OL5 Howto: Installing and using cURL with support for SCP and SFTP
    see 3) Set up SSH user equivalence for SCP and SFTP

  • ODBC API SQLBindParameter Bug When Passing Chinese Characters?

    Hi Everyone,
    I am accessing Oracle 10g database (on Windows XP) from Windows XP machine.
    Table TEST_TABLE is defined as
    CREATE TABLE TEST_TABLE(NVARCHAR2(255))
    Using ODBC (code comes shortly) data are successfully inserted into table using SQLBindParameter to bind parameter values.
    The same data can be succesfully read from the table. But the query to retrieve only those rows containing chinese characters simply doesn't work.
    I am using SQLBindParameter to bind a parameter placeholder when executing SELECT * FROM TEST_TABLE WHERE C1=?. It simply doesn't find the rows if parameter value contains chinese characters, it only finds rows if parameter contains pure ASCII data.
    Am I missing something here? NVARCHAR2 data type should be able to always store unicode data. My database settings are:
    NLS_NCHAR_CHARACTERSET=AL16UTF16 and NLS_CHARACTERSET=WE8MSWIN1252
    Here is the code:
    #include "stdafx.h"
    #include <windows.h>
    #include <sql.h>
    #include <sqlext.h>
    #define SQLCheck(x)          if (SQL_SUCCESS != x) {\
                                                                SQLINTEGER native;\
                                                                SQLSMALLINT msgLength;\
                                                                SQLCHAR szState[SQL_MAX_MESSAGE_LENGTH],szErrorMessage[SQL_MAX_MESSAGE_LENGTH];\
                                                                ::SQLError(henvAllConnections,hdbc,hstmt,szState,&native,szErrorMessage,SQL_MAX_MESSAGE_LENGTH,&msgLength);\
                                                                printf("Error state=%s, native=%d, message = %s\n",szState,native,szErrorMessage);\
                                                                DebugBreak();\
    #define MAX_CONNECT_LEN 512
    int tmain(int argc, TCHAR* argv[])
         SQLRETURN nRetCode     ;     
         HENV henvAllConnections;
         HDBC hdbc(0);
         HSTMT hstmt(SQL_NULL_HSTMT);
         //TEST_TABLE is created using the following query CREATE TABLE TEST_TABLE(C1 NVARCHAR2(255))
         nRetCode = ::SQLAllocEnv(&henvAllConnections);
         SQLCheck(nRetCode)
         nRetCode = ::SQLAllocConnect(henvAllConnections, &hdbc);
         SQLCheck(nRetCode)
         HWND hWnd = ::GetDesktopWindow();
         TCHAR szConnectOutput[MAX_CONNECT_LEN];
         TCHAR *pszConnectInput = const_cast<LPTSTR>(_T("DSN=o10 american;UID=no;PWD=no#"));
         SWORD nResult;
         nRetCode = ::SQLDriverConnect(hdbc, hWnd, reinterpret_cast<SQLTCHAR *>(pszConnectInput),
              SQL_NTS, reinterpret_cast<SQLTCHAR *>(szConnectOutput), sizeof(szConnectOutput),
              &nResult, SQL_DRIVER_NOPROMPT);
         SQLCheck(nRetCode)
         nRetCode = ::SQLAllocStmt(hdbc, &hstmt);
         SQLCheck(nRetCode)
         TCHAR* szQuery = T("INSERT INTO TESTTABLE(C1) VALUES(?)");
         nRetCode = ::SQLPrepare(hstmt,reinterpret_cast<UCHAR*>(szQuery), SQL_NTS);     
         SQLCheck(nRetCode)
         SQLSMALLINT     DataType,DecimalDigits,Nullable;
         SQLUINTEGER     ParamSize;
         nRetCode = ::SQLDescribeParam(hstmt, 1, &DataType, &ParamSize,&DecimalDigits, &Nullable);
         SQLCheck(nRetCode)
         wchar_t chineseData[6];
         chineseData[0]=0x0023;chineseData[1]=0x0050;chineseData[2]=0x0043;chineseData[3]=0xBA85;chineseData[4]=0xc870;chineseData[5]=0x0000;
         wchar_t asciiData[] = L"test data";
         SQLLEN sqlnts = SQL_NTS;
         nRetCode = ::SQLBindParameter(hstmt, (UWORD)1,SQL_PARAM_INPUT,SQL_C_WCHAR,SQL_WVARCHAR,ParamSize,DecimalDigits,chineseData,static_cast<SQLINTEGER>(wcslen(chineseData) * sizeof(wchar_t)),&sqlnts);
         SQLCheck(nRetCode)
         nRetCode = ::SQLExecute(hstmt);
         SQLCheck(nRetCode)
         nRetCode = ::SQLBindParameter(hstmt, (UWORD)1,SQL_PARAM_INPUT,SQL_C_WCHAR,SQL_WVARCHAR,ParamSize,DecimalDigits,asciiData,static_cast<SQLINTEGER>(wcslen(asciiData) * sizeof(wchar_t)),&sqlnts);
         SQLCheck(nRetCode)
         nRetCode = ::SQLExecute(hstmt);
         SQLCheck(nRetCode)
         nRetCode = SQLFreeStmt(hstmt,SQL_DROP);
         SQLCheck(nRetCode)
         TCHAR* pszSQL = _T("SELECT * FROM TEST_TABLE WHERE C1=?");
         int nMaxLength = 1024;
         SQLLEN lLength = SQL_NTS,dataLen;
         TCHAR lpszFieldName[256];
         SWORD nActualLen,nSQLType,nScale,nNullability;
         SQLULEN     nPrecision;
         SQLSMALLINT nResultCols;
         wchar_t pWData[1024];
         nRetCode = ::SQLAllocStmt(hdbc, &hstmt);
         SQLCheck(nRetCode)
         SQLLEN paramLength = static_cast<SQLINTEGER>(wcslen(chineseData) * sizeof(wchar_t));     
         nRetCode = ::SQLBindParameter(hstmt,1,SQL_PARAM_INPUT,SQL_C_WCHAR,SQL_WVARCHAR,nMaxLength,0,chineseData,paramLength,&sqlnts);     
         SQLCheck(nRetCode)
         nRetCode = ::SQLExecDirect(hstmt, reinterpret_cast<SQLTCHAR *>(pszSQL), SQL_NTS);
         SQLCheck(nRetCode)
         nRetCode = ::SQLNumResultCols(hstmt, &nResultCols);
         SQLCheck(nRetCode)
         nRetCode = ::SQLDescribeCol(hstmt, 1,     reinterpret_cast<SQLTCHAR *>(lpszFieldName), 255, &nActualLen,&nSQLType,&nPrecision,&nScale,&nNullability);          
         SQLCheck(nRetCode)
         nRetCode = ::SQLBindCol(hstmt, 1,     SQL_C_WCHAR, pWData, (nPrecision+1) * sizeof(wchar_t),     &dataLen);
         SQLCheck(nRetCode)
         nRetCode = nRetCode = ::SQLFetch(hstmt);
         if (SQL_NO_DATA_FOUND == nRetCode)
              printf("No data found although data are in the table!\n");
         else
              printf("Found chinese data in the table!\n");
         //now try with another qay of SQLBindParameter, which uses length instead of SQL_NTS     
         nRetCode = ::SQLBindParameter(hstmt,1,SQL_PARAM_INPUT,SQL_C_WCHAR,SQL_WVARCHAR,nMaxLength,0,chineseData,paramLength,&paramLength);
         SQLCheck(nRetCode)
         nRetCode = ::SQLExecDirect(hstmt, reinterpret_cast<SQLTCHAR *>(pszSQL), SQL_NTS);
         SQLCheck(nRetCode)
         nRetCode = nRetCode = ::SQLFetch(hstmt);
         if (SQL_NO_DATA_FOUND == nRetCode)
              printf("No chinese data found even using different way of SQLBindParameter, although chinese data are in the table!\n");
         else
              printf("Found chinese data in the table!\n");
         //now try with ascii data
         nRetCode = ::SQLBindParameter(hstmt,1,SQL_PARAM_INPUT,SQL_C_WCHAR,SQL_WVARCHAR,nMaxLength,0,asciiData,static_cast<SQLINTEGER>(wcslen(asciiData) * sizeof(wchar_t)),&sqlnts);
         SQLCheck(nRetCode)
         nRetCode = ::SQLExecDirect(hstmt, reinterpret_cast<SQLTCHAR *>(pszSQL), SQL_NTS);
         SQLCheck(nRetCode)
         nRetCode = ::SQLBindCol(hstmt, 1,     SQL_C_WCHAR, pWData, (nPrecision+1) * sizeof(wchar_t),     &dataLen);
         SQLCheck(nRetCode)
         nRetCode = ::SQLFetch(hstmt);
         if (SQL_NO_DATA_FOUND == nRetCode)
              printf("also didn't found ascii data!\n");
         else
              printf("found ascii data!\n");
         nRetCode = ::SQLFreeStmt(hstmt,SQL_DROP);
         SQLCheck(nRetCode)
         nRetCode = SQLAllocStmt(hdbc,&hstmt);
         SQLCheck(nRetCode)
         //now read all values to prove data are really there
         TCHAR* pszSQLAllDaya = _T("SELECT * FROM TEST_TABLE");
         nRetCode = ::SQLExecDirect(hstmt, reinterpret_cast<SQLTCHAR *>(pszSQLAllDaya), SQL_NTS);
         SQLCheck(nRetCode)
         nRetCode = ::SQLBindCol(hstmt, 1,     SQL_C_WCHAR, pWData, (nPrecision+1) * sizeof(wchar_t),     &dataLen);
         SQLCheck(nRetCode)
         while (SQL_NO_DATA_FOUND != SQLFetch(hstmt))
              printf("data from table %S\n",pWData);
         nRetCode =      ::SQLFreeStmt(hstmt, SQL_DROP);
         SQLCheck(nRetCode)
    hstmt = SQL_NULL_HSTMT;
         ::SQLDisconnect(hdbc);
         ::SQLFreeConnect(hdbc);
         ::SQLFreeEnv(henvAllConnections);
         return 0;
    Regards,
    Darko

    Hi Darko,
    You are right, I think you have discovered a bug in the 10.1.0.2 ODBC driver. I believe this problem is described in Bug 3249731.
    The good news is that this is already fixed in the 10.1.0.3 ODBC driver. Do you have access to MetaLink? Goto patches and download "Patchset 3842783" which is the ORACLE ODBC INSTANT CLIENT DRIVER PATCH VERSION 10.1.0.3.0
    Good Luck
    Nat

Maybe you are looking for

  • Imp db into 8.1.5 from 9.1.0 dmp file

    Hi, all, I have exported data from 9.1.0. When I tried to import it into 8.1.7, the following error occured: IMP-00017: following statement failed with ORACLE error 6550: "BEGIN " "sys.dbms_logrep_imp.instantiate_schema(schema_name=>'B1', export_db_n

  • Im using firefox 3.6.18 and when i open website it hangs for a few seconds...

    im surfing at myanimelist.net and when i loads the pages, it hangs for a few seconds and stop... then hangs again (not responding).. i disable all the plugins but it still the same.. and ive deleted .dat files of plugins suggested by troubleshoot but

  • Premiere pro will not import .mov files

    Premiere pro CS3 running on Vista 64 bit will not import .mov files. After Effects CS4 has the same problem, it says I don't have the correct version of Quick Time installed. I'm using the 64 bit version 7.6.4 for Vista. Any help would be appreciated

  • Portal on BlackBerry

    Hi Experts, Can we access Enterprise Portal from BlackBerry? I have read many threads and documentation suggesting it was not possible. Is it possible now? Where can I find official information about the support? I checked in PAM but could not locate

  • Forwarding help

    I just set up forwarding and a mask with my godaddy account for my iweb site but when I try to log in i get an error message saying: To view this page, you need to log in to area "idisk.mac.com" on www.karenard.com. Then it asks for a name and passwo