Issue with Download and Loss of Non-ASCII Characters

I have a need to allow my user to download the contents of an HTML Region as a file. This region contains some Greek letters, i.e. non-ASCII, used with some common finance formulas.
I am able to copy the contents off this region using JavaScript without any issue.
Moreover, I can copy the contents from JavaScript into a Page Item and then render the region with PL/SQL. Again, this works without an issue.
However, when I try to download the region, the Greek letters are lost in the downloaded document. Instead they are replaced with this weird series of characters: (Δ
I've created a sample app to demonstrate this problem at apex.oracle.com:
URL: http://apex.oracle.com/pls/apex/f?p=34765:1
UID: GUEST_DEV
PWD: greeksgone
Click the button labeled "Copy HTML Via JS" and you will see the statically populated region copied into the second region.
Click the button labeled "Copy HTML Via APEX" and you will see the statically populated region copied into the third region. This is achieved by copying the HTML into a Page Item and then submitting the page. When the page returns, the value of this Page Item is then used to populate the third region. As you can see, the Greek letters are there as normal.
However, if you click the "Download HTML" button you will see the the Greek letters are not present in the resulting file.
-Joe

Joe Upshaw wrote:
I am just totally stuck here.
This is what the document looks like without the required meta tag:
<HTML>
<BODY>
<STYLE>
<DIV>
div.riskScenarioMatrixDiv
overflow:auto;
....This version does not display the greek letters.
If I could simply add this one meta tag in, everything would work beautifully:
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<BODY>
<STYLE>
<DIV>
div.riskScenarioMatrixDiv
overflow:auto;
....However, I have tried every combination I can think of in the code block but, any time that I add that meta tag, I get a *404 Page Not Found* error.
The only thing standing between what we have and what we need is getting that meta tag in the output but, I just can't seem to find a way to do this. Actually, we'd really like to have, within the head tags; the meta tag, the style and the title but, not being able to get that meta tag in is the difference between acceptable and broken. It works with the others in the body.
DECLARE
ls_RiskMatrixTitle  VARCHAR2(32767);
ls_RiskMatrixHTML   VARCHAR2(32767);
ls_DefaultFileName  VARCHAR2(512);
BEGIN
ls_RiskMatrixHTML   := :P1_HTML;
ls_DefaultFileName  := 'TestMe.html';         
ls_RiskMatrixTitle  := 'Test of Download';        
OWA_UTIL.MIME_HEADER( 'text/html',  False, 'UTF8' );
HTP.P( 'Content-Disposition: attachment; filename=' || ls_DefaultFileName );
--HTP.META( 'Content-Type',  null, 'text/html; charset=utf-8' );          
--HTP.TITLE( ls_RiskMatrixTitle ); 
OWA_UTIL.HTTP_HEADER_CLOSE;
HTP.HTMLOPEN;   
HTP.BODYOPEN;
HTP.STYLE('<DIV>' || :P1_MATRIX_STYLE || '</DIV>');
HTP.P(ls_RiskMatrixTitle);
HTP.P(ls_RiskMatrixHTML);
APEX_APPLICATION.G_UNRECOVERABLE_ERROR := True;
END;
You appear to be confusing HTTP and HTML.
The HTTP header != HTML <tt>head</tt> element.
HTP.META( 'Content-Type',  null, 'text/html; charset=utf-8' );          
HTP.TITLE( ls_RiskMatrixTitle );  This generates HTML content. It does not go in the HTTP header. You should be generating an HTML <tt>head</tt> element containing this (and the <tt>style</tt> element) between <tt>HTP.HTMLOPEN</tt> and <tt> HTP.BODYOPEN</tt>.
Also note that these web toolkit methods generate really obsolete HTML, therefore I never use them (and nor does APEX these days).
Don't have time to get more into this now...

Similar Messages

  • [SOLVED] KDEmod - problem with mounting b/c of non-ASCII characters

    Hi guys!
    I finally set aside a few gigabites for Archlinux - it is no more in a virtual machine So far I managed to configure everything with the excellent wiki. It's runnin' and kickin'. I run accross only one problem:
    When I insert a CD with a label that has non-ASCII characters (some Polish ones in my case) and I click on it's icon in Konqueror I get the message that "file such-and-such doesn't exist" - and the Polish characters are clearly misspelled (it is not a fonts' problem - I double checked). I can access the folder either via console or via konqueror if I go to the /media folder, though.
    Any ideas how I can fix it? If you need more info, let me know.
    Last edited by JeremyTheWicked (2008-05-31 14:46:07)

    You're welcome . Now it's advisable for you to edit the title of your initial post: add [SOLVED]. Perhaps more clear wording would be in order, too, for the benefit of the search engine. The problem seems to be a trifle in retrospect, but somehow it takes some effort to find the solution, doesn't it ?

  • I have been having issues with downloading and updating apps on my iPod 4th gen. How do I fix this? It's getting really old really fast.

         So yeah, this has been going on the past week. When I tap to upload my apps, some update right away, but others won't. Sometimes they will dowload half way, sometimes they won't at all, what causes them to stop is this little message that pops up saying, "This app cannot be downloaded at this time." and it gives you options 'Done' or 'Retry." Instinctively I hit retry. Through the course of the day I did this, I kept hitting retry, and eventually all the apps that were updating, updated, but not very effieciently. All apps updated, except for one, Facebook. No matter how anytimes I hit retry, it wouldn't update. I got real sick and tired of it, so I deleted it. I decided to go through everything and delete old apps, pictures, music, thinking that I didn't have enough space. I go to download an app I've already had to test this theory out: Still doesn't work. The stupid thing won't even TRY to download. So, is there any way I can fix this without taking a sledgehammer to my iPod? Because, honestly, I am severly ticked off at how stubborn this is. Please help. Before my patience runs out and I break this thing.

    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    If no joy...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    It should be Noted that anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID.

  • I'm having issues with downloading and updating my softwares in creative cloud...

    I've been notified by creative cloud telling me that 6 of my softwares (Premier, After Effecs, Bridge, Photoshop etc) need updating. I clicked update on all of them at the same time and only one of them (speedgrade) successfully updated. All the rest of them are saying there was an error and that that they are unable to update.The same happens whenever I retry the update.
    Any solutions?

    Please read, and reply back here with information https://forums.adobe.com/thread/1499014
    -try some steps such as changing browsers and turning off your firewall
    -also flush your browser cache so you are starting with a fresh browser
    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • FAQ: Where can I get help with downloading and installation?

    See this page for options for contacting Adobe regarding problems with downloading and installation:
    "Contact support - download and installation"
    You can ask questions and search for answers on the Adobe user-to-user forum dedicated to downloading, installation, and setup.
    You can also check the Customer Service FAQ lists for issues with downloading and installation.
    You can order Premiere Pro CS6 here ... or try it free for 30 days.

    Hello,
    This kind of question is best asked in the Windows Forums, however I've had some succession with a similar issue myself.
    Non-Genuine Windows means that it can't authenticate your copy of Windows.
    It's not a problem, all your need is a genuine product key code. Provided you don't have different version of Windows 7 installed to the one you are buying (for example windows 7 Home Premium and Windows 7 business) Then you can use the new key code.
    Click on the Start Button and type: CMD (into the 'Search programs and files' field in the Start Menu)
    The Start Menu will show 'CMD.exe', 
    Right-click the CMD.exe file and select Run As Administrator.
    In the CMD window, type: slmgr.vbs -ipk <type your product key here>
    To activate windows after changing the key, type: slmgr.vbs -ato
    It should now accept the new key code and you will need to be connected to the Internet to authenticate.
    If by chance the windows 7 types are different (One is Home premium say and the other is Business) then you will need to uninstall that copy of Windows 7 and install the new one. If your using BootCamp then you will need to go into BootCamp under system preferences and remove that copy of Windows (delete it)
    Then create a new setup with your new Windows 7 disk.
    For me I had the same type of windows, changing the product code worked. Saved me the bother of having to reinstall Windows again and it was all genuine.
    Best of luck

  • Problems with password including non-ASCII characters

    I am a German language user with a German keyboard but an English OS as main language. Therefore my passwords (simple user and admin) includes non-ASCII characters used in German, French and Spanish language, which increases security. This works fine in the majority of login scenarios. There are, however, 3 scenarios where neither my non-ASCII simple user nor my non-ASCII admin PW are accepted:
    1) running "sudo" in Terminal;
    2) When I try to shut down and another user account is still open. Doing this brings up a login window asking for the PW of the other user that does not accept non-ASCII;
    3) Using Leopard/SnowLeopard CacheCleaner. Upon opening, this app asks for an admin PW, but does not recognize non-ASCII.
    Am I right in assuming that this has to do with non-ASCII PWs? I thought ASCII times were gone given the remarkable language flexibility of Mac OS over the years. I know this stupid problem only from Win XP. There it is even worse.
    Is there a way to overcome this problem without always temporarily changing my PW? Thanks.

    I think the problem is with the applications themselves and should be reported to the developer. Although some non-ASCII characters are acceptable for an admin password, in my experience most Unix systems don't like non-ASCII characters in passwords. It may be easier to avoid them if you can.
    OS X should simply request your admin password to shut down when another user account is open. An alert dialog usually appears warning that the other user is still logged in and giving you the option to log the other account out then shut down. But in my experience the only authorization needed is for your admin account.

  • I have slow internet speed and having issue with download of photoshop cc is there an alternate I can go somewhere with high speed to download.

    I have slow internet speed and having issue with download of photoshop cc is there an alternate I can go somewhere with high speed to download. without using this creative cloud that downloads first.

    We need to know more about your system, please download EtreCheck and run the report and please post it on your next reply. Then we can see how your system is configured, what apps are on it and look for anything obvious. We will look forward to seeing your report.

  • I have been suggested to down grade to 10.6.6 due to issues with Adobe and Apple working things out. I have downloaded 10.6.6 but wont let me install. Any ideas?

    I have been suggested to down grade to 10.6.6 due to issues with Adobe and Apple working things out. I have downloaded 10.6.6 but wont let me install. Any ideas?

    Yes, simply reinstall from your Snow Leopard installer disc.  The reinstall will not erase the hard drive.  After reinstalling you can upgrade to 10.6.6 with your updater.

  • Is there a compatability issue with Firefox and Andriod operating system 2.2.3? I can't get Firefox to work. I have tried uninstalling it and it won't download. in English

    Is there a compatability issue with Firefox and Andriod operating system 2.2.3? I can't get Firefox to work. I have tried uninstalling it and it won't download. in English

    Hi Drbobdog, there shouldn't be a compatibility with Android OS 2.2.3. There may be a compatability with the device itself.
    Here are the system requirements:
    https://wiki.mozilla.org/Mobile/Platforms/Android#System_Requirements
    (also seen here as well : http://www.mozilla.org/en-US/mobile/platforms/ )
    I hope this helps.

  • Search for users and non-ASCII characters

    I am having a little issue with the "Accounts - Find Users" functionality. The search breaks on what I assume is non-ASCII characters (we use the following three up here in Denmark: �, �, �). To be precise, I have a user with the first name "J�rgen". Searching for first names starting with "J" works just fine but "J�" returns zero matches.
    My setup is with two machines, one (A) holding the MySQL database and one (B) serving Identity Manager on top of tomcat.
    Both A and B are RHEL boxes, and both have da_DK.UTF-8 as default locale.
    MySQL's /etc/my.cnf file has the following entry (as recommended in create_waveset_tables.mysql):
    [mysqld]
    default-character-set=utf8
    default-collation=binFor clarity, some functionality works just fine in Identity Manager with these non-ASCII characters such as adding a user whose name contains non-ASCII characters (not only ��� but also � for example). At the moment, it appears to be the search functionality which is not working correctly as I would expect it to. I'm still on the fence concerning whether I've missed something in terms of configuration, or whether this is a limitation.
    Does anyone know whether this problem is on my side or the software's side?

    I am having a little issue with the "Accounts - Find Users" functionality. The search breaks on what I assume is non-ASCII characters (we use the following three up here in Denmark: �, �, �). To be precise, I have a user with the first name "J�rgen". Searching for first names starting with "J" works just fine but "J�" returns zero matches.
    My setup is with two machines, one (A) holding the MySQL database and one (B) serving Identity Manager on top of tomcat.
    Both A and B are RHEL boxes, and both have da_DK.UTF-8 as default locale.
    MySQL's /etc/my.cnf file has the following entry (as recommended in create_waveset_tables.mysql):
    [mysqld]
    default-character-set=utf8
    default-collation=binFor clarity, some functionality works just fine in Identity Manager with these non-ASCII characters such as adding a user whose name contains non-ASCII characters (not only ��� but also � for example). At the moment, it appears to be the search functionality which is not working correctly as I would expect it to. I'm still on the fence concerning whether I've missed something in terms of configuration, or whether this is a limitation.
    Does anyone know whether this problem is on my side or the software's side?

  • A Download servlet: non-ASCII characters not working

    This is my servlet used for file download:
    public void doPost(HttpServletRequest request, HttpServletResponse response) {
      String filepath = request.getParameter("filepath");
      String filename = request.getParameter("filename");
      response.setContentType("application/zip");
      response.setHeader("Content-Disposition", "attachment;filename=\""+filename+"\";");
      ServletOutputStream sos = null;
      BufferedInputStream bis = null;
      try {
        sos = response.getOutputStream();
        bis = new BufferedInputStream(new FileInputStream(source));
        byte buffer[] = new byte[2048];
        int c;
        while((c = bis.read(buffer)) != -1)
          sos.write(buffer, 0, c);
      } catch(Exception e) {
      } finally {
        bis.close();
        sos.close();
    }It does not work when the filename contains non-ASCII characters (e.g., extended ASCII, CJK ...)
    What do I fix this? Thanks!

    One possiblitiy that occurs to me is you have too many encoding things going on and you are sorta "over-encoding" things, as it were....
    All I can think to do is give you this sample JSP page that I created when I was trying to figure all this web encoding stuff with forms back in the day. So perhaps you can use this as a basis for your own page.
    // _lang.jsp
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title></title>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body bgcolor="#ffffff" background="" text="#000000" link="#ff0000" vlink="#800000" alink="#ff00ff">
    <%
    request.setCharacterEncoding("UTF-8");
    String str = "\u7528\u6237\u540d";
    String name = request.getParameter("name");
    %>
    req enc: <%= request.getCharacterEncoding() %><br />
    rsp enc: <%= response.getCharacterEncoding() %><br />
    str: <%= str %><br />
    name: <%= name %><br />
    <br />
    <a href="_lang.jsp?name=<%= java.net.URLEncoder.encode(str, "UTF-8") %>">as link</a>
    <br />
    <br />
    <form method="GET" action="_lang.jsp" encoding="UTF-8">
    Name: <input type="text" name="name" value="" >
    <input type="submit" name="submit" value="GET Submit" />
    </form>
    <form method="POST" action="_lang.jsp" encoding="UTF-8">
    Name: <input type="text" name="name" value="" >
    <input type="submit" name="submit" value="POST Submit" />
    </form>
    </body>
    </html>

  • An issue with authentication and authorization on ISE 1.2

    Hi, I'm new to ISE.
    I have an issue with authentication and authorization.
    I have ISE 1.2 plus patch 6 installed on VMware.
    I have built-in Windows XP supplicant and 2960 cisco switch with IOS c2960-lanbasek9-mz.150-2.SE5.bin
    On supplicant I use EAP(PEAP) with EAP-MSCHAP v2.
    I created  authentication and authorization rules with Active Directory  as External Identity Source. Also I applied  authorization profile with DACL.I login on Windows XP machine under different Active Directory accounts. Everything works fine (authentication, authorization ), but only for several hours. After several hours passed , authentication and authorization stop working . I can see that ISE trying authenticate and authorize users, but ISE always use only one account for  authentication and authorization . Even if I login under different accounts ISE continue to use only one last account.
    I traied to reboot switch and PC,but it didn’t help. Only rebooting of ISE helps. After ISE rebooting, authentication and authorization start to work properly for several hours.
    I don’t understand is it a glitch or I misconfigured ISE or switch, supplicant?
    What  should I do to resolve this issue?
    Switch configuration:
     testISE#sh runn
    Building configuration...
    Current configuration : 7103 bytes
    ! Last configuration change at 12:20:15Tue Apr 15 2014
    ! NVRAM config last updated at 10:35:02  Tue Apr 15 2014
    version 15.0
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname testISE
    boot-start-marker
    boot-end-marker
    no logging console
    logging monitor informational
    enable secret 5 ************
    enable password ********
    username radius-test password 0 ********
    username admin privilege 15 secret 5 ******************
    aaa new-model
    aaa authentication dot1x default group radius
    aaa authorization network default group radius
    aaa authorization auth-proxy default group radius
    aaa accounting update periodic 5
    aaa accounting dot1x default start-stop group radius
    aaa server radius dynamic-author
     client 172.16.0.90 server-key ********
    aaa session-id common
    clock timezone 4 0
    system mtu routing 1500
    authentication mac-move permit
    ip dhcp snooping vlan 1,22
    ip dhcp snooping
    ip domain-name elauloks
    ip device tracking probe use-svi
    ip device tracking
    epm logging
    crypto pki trustpoint TP-self-signed-1888913408
     enrollment selfsigned
     subject-name cn=IOS-Self-Signed-Certificate-1888913408
     revocation-check none
     rsakeypair TP-self-signed-1888913408
    crypto pki certificate chain TP-self-signed-1888913408
    dot1x system-auth-control
    spanning-tree mode pvst
    spanning-tree extend system-id
    vlan internal allocation policy ascending
    ip ssh version 2
    interface FastEthernet0/5
     switchport mode access
     ip access-group ACL-ALLOW in
     authentication event fail action next-method
     authentication event server dead action reinitialize vlan 1
     authentication event server alive action reinitialize
     authentication host-mode multi-auth
     authentication open
     authentication order dot1x mab
     authentication priority dot1x mab
     authentication port-control auto
     authentication periodic
     authentication timer reauthenticate server
     authentication violation restrict
     mab
     dot1x pae authenticator
     dot1x timeout tx-period 10
     spanning-tree portfast
    interface FastEthernet0/6
     switchport mode access
     ip access-group ACL-ALLOW in
     authentication event fail action next-method
     authentication event server dead action reinitialize vlan 1
     authentication event server alive action reinitialize
     authentication order dot1x mab
     authentication priority dot1x mab
     authentication port-control auto
     authentication periodic
     authentication timer reauthenticate server
     authentication violation restrict
     mab
     dot1x pae authenticator
     dot1x timeout tx-period 10
     spanning-tree portfast
    interface FastEthernet0/7
    interface Vlan1
     ip address 172.16.0.204 255.255.240.0
     no ip route-cache
    ip default-gateway 172.16.0.1
    ip http server
    ip http secure-server
    ip access-list extended ACL-ALLOW
     deny   icmp any host 172.16.0.1
     permit ip any any
    ip radius source-interface Vlan1
    logging origin-id ip
    logging source-interface Vlan1
    logging host 172.16.0.90 transport udp port 20514
    snmp-server community public RO
    snmp-server community ciscoro RO
    snmp-server trap-source Vlan1
    snmp-server source-interface informs Vlan1
    snmp-server enable traps snmp linkdown linkup
    snmp-server enable traps mac-notification change move
    snmp-server host 172.16.0.90 ciscoro
    radius-server attribute 6 on-for-login-auth
    radius-server attribute 6 support-multiple
    radius-server attribute 8 include-in-access-req
    radius-server attribute 25 access-request include
    radius-server dead-criteria time 5 tries 3
    radius-server vsa send accounting
    radius-server vsa send authentication
    radius server ISE-Alex
     address ipv4 172.16.0.90 auth-port 1812 acct-port 1813
     automate-tester username radius-test idle-time 15
     key ******
    ntp server 172.16.0.1
    ntp server 172.16.0.5
    end

    Yes. Tried that (several times) didn't work.  5 people in my office, all with vers. 6.0.1 couldn't access their gmail accounts.  Kept getting error message that username and password invalid.  Finally solved the issue by using Microsoft Exchange and "m.google.com" as server and domain and that the trick.  Think there is an issue with imap.gmail.com and IOS 6.0.1.  I'm sure the 5 of us suddently experiencing this issue aren't the only ones.  Apple will figure it out.  Thanks.

  • TS5376 I'm having a problem with downloading and installing the new version of itunes for windows (11.1.4)  I have done everything the troubleshooting article has said and it is still not working properly.

    'm having a problem with downloading and installing the new version of itunes for windows (11.1.4)  I have done everything the troubleshooting article has said and it is still not working properly.  I have even done a repair to see if that works and it has not.  Has anyone else found a new way to get it working?

    Try Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Replacing non-ASCII characters with HTML charcter references

    Hi All,
    In Oracle 10g or greater is there a built-in function that will convert a string with non-ASCII characters like this
    a b č 뮼
    into an ASCII string with HTML character references like this?
    a b & # x 0 1 0 D ; & # x B B B C ;
    (note I had to include spaces between each character in the sample code for message to prevent the forum software from converting my text)
    I tried using
    utl_i18n.escape_reference( val, 'us7ascii' )
    but for some reason it returns
    a b c & # x B B B C ;
    Note how it converted the Western European character "č" to its unaccented counterpart "c", not "& # x 0 1 0 D ;" (is this a bug?).
    I also tried a custom solution using regexp_replace and asciistr (which I can't include here because the forum software chokes on it) but it only returns the correct result for values <=4000 characters long. Unfortunately asciistr doesn't appear to accept CLOB values larger than 4000 characters. It returns an error message like
    (ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 30251, maximum: 4000) ).
    I'm looking for a solution that works on CLOB data of any size.
    Thanks in advance for any insight you can provide.
    Joe Fuda

    So with that (UTF8) in mind, let's take another look.....
    As shown below, I used a AL32UTF8 database.
    Note: I did not use a unicode capable tool for querying. So I set console mode code page to 1250 just to have č displayed properly (instead of posing as an è).
    Also, as a result of using windows-1250 for client character set, in the val column and in the second select's ncr column (iso8859-1), è (00e8) has been replaced with e through character set conversion going from server back to client.
    Running the same code on a database with a db character set such as we8mswin1252, that doesn't define the č (latin small c with caron) character, would yield results with a c in the ncr column.
    C:\>chcp 1250
    Aktuell teckentabell: 1250
    C:\>set nls_lang=.ee8mswin1250
    C:\>sqlplus test/test
    SQL*Plus: Release 11.1.0.6.0 - Production on Fri May 23 21:25:29 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the OLAP option
    SQL> select * from nls_database_parameters where parameter like '%CHARACTERSET';
    PARAMETER              VALUE
    NLS_CHARACTERSET       AL32UTF8
    NLS_NCHAR_CHARACTERSET AL16UTF16
    SQL> select unistr('\010d \00e8') val, utl_i18n.escape_reference(unistr('\010d \00e8'),'us7ascii') NCR from dual;
    VAL  NCR
    č e  c e
    SQL> select unistr('\010d \00e8') val, utl_i18n.escape_reference(unistr('\010d \00e8'),'we8iso8859p1') NCR from dual;
    VAL  NCR
    č e  &# x10d; e     <- "è"
    SQL> select unistr('\010d \00e8') val, utl_i18n.escape_reference(unistr('\010d \00e8'),'ee8iso8859p2') NCR from dual;
    VAL  NCR
    č e  č &# xe8;
    SQL> select unistr('\010d \00e8') val, utl_i18n.escape_reference(unistr('\010d \00e8'),'cl8iso8859p5') NCR from dual;
    VAL  NCR
    č e  &# x10d; &# xe8;In the US7ASCII case, where it should be possible for all non-ascii characters to be escaped, it seems as if the actual escape step is skipped over.
    Hope this helps to understand whether utl_i8n is usable or not in your case.
    Message was edited by:
    orafad
    Fixed replaced character references :)

  • Cannot login with password containing non-ascii characters

    Hello,
    I have web application, form based login. UTF-8 is specified "everywhere".
    And it works, except for passwords.
    If user register itself with password containing non-ascii characters, it is correctly written in database, but when doing either programmatic login or normal form based login, if fails.
    If the password is only ascii, it works.
    Username of login could be ascii or non-ascii, it doesn't matter, both works.
    I'm using sun java application server 9.1.
    jdbc realm.
    I'm not using hashing passwords, just clean (now)
    I tried configure realm Charset: UTF8 as last chance, but it doesn't work either.
    The problem is only with non-ascii characters in password.
    Any help very appreciated
    Thanks a lot

    hi,
    I know all that, but that's not the case. My app uses preparedStatements, everything is properly configured, in all pages, utf-8 is going from user to db and back without any problems.
    The only problem is with password field. As I am using form based login, with jdbc realm configured (again, nicely working when only ascii characters), I have very little chance to do something bad through the login phase.
    I'm not talking about special characters, I'm talking about non-ascii characters, let's say - Chinese, arabish, Russian alphabet etc.
    When user registers (my code), the fields are properly written to db. I have checked that, trust me.
    But the Sun app server realm seems to have some problems with the password field.
    (realm uses jdbc connection to mysql, the url contains all extra parameters to be sure about utf8. there is nothing more what can be configured...)
    If I try other alphabet codes in login and ascii in password, it works. But soon, as I use other alphabet code also in password, it doesn't work anymore.
    My only idea is, that I could try MD5 to create ascii only characters (I hope it works that way) on the client with javascript and then set Digest to MD5 in realm configuration. But still, it seems very strange. The clear way storage should also function? (now set Digest to 'none')
    Is it a bug of Sun App Server?
    thanks

Maybe you are looking for