ALPHANUM datatype contains non-alphanumeric character like @#$&*

Hi All,
I use ALPHANUM datatype in one table with 127 size. As per definition in Developer guide
"ALPHANUM(n) data type specifies a variable-length character string which contains alphanumeric characters"
Example :
insert into "SOMNATH"."aadata" values(to_ALPHANUM ('!@#$%')) ;
insert into "SOMNATH"."aadata" values(')(*&!@#$%') ;
Above statement executed successfully. So HANA cannot check alphanumeric char. at the time of insertion or any other reason?
Message was edited by: Tom Flanagan

Hmm... not sure about PASAL ... never heard of that one and it doesn't pop up in my search engine of choice.
But as you describe it, it seems to be a standard/convention on how to name your variables.
Limiting what type of characters can be entered into the system definitively limits the portability of your application. Something that might not be relevant today, but very likely tomorrow...
Take the user name in SAP HANA for an example. With SPS8 our development finally made the move to allow NVARCHAR characters as user names - allowing chinese, indian, thai, israeli ... users to choose names for user accounts in the alphabet that is right for them.
Concerning processing and memory consumption: I don't really see the point in bringing up a link to a MS SQL Server blog here.
MS SQL Server encodes data very differently from SAP HANA. And Oracle stores data differently than IBM DB 2 and mySQL stores data differently than PostgreSQL ....
What I can say is: as long as you don't put in "international" characters into a NVARCHAR column, memory and processing requirements are the same as for VARCHAR.
It's easy to try out.
So, using the VARCHAR instead of NVARCHAR only limits the application but won't save a lot of resources (as long as you don't actually use the extended character set)
- Lars

Similar Messages

  • Non-Alphanumeric Character in a String

    I understand if we have a non-alphanumeric character in a String, we have to put a backward slash in front of that character. For example, we have to put a backward slach in front of a "backward slash". Eg. we do \\ to put a backward slash in a String.
    What about a dot (.) or a dash (-)? Do we have to do the same thing?

    No, it's only for control characters like "newline", characters with special meaning in strings i.e. " and \ and any character that can't be represented in the character encoding of your java source file.

  • BUG: registered servers missing when password contains non-alphanumeric

    I have a fresh installation of DS7 using Sun Java Web Server 7 to host DSCC7. Using DSCC7 web interface I click New Server and the procedure appears to complete successfully (no errors during creation, registration successful). However in the web interface the new server is not listed.
    From the command line the new server is listed.
    $ /opt/SUNWdsee7/bin/dsccreg list-servers
    Hostname Port sPort Type Owner Flags iPath Description
    www-c-directory 389 636 DS nobody /var/opt/SUNWdsee7/internal
    Cause: the DSCC administrator's password contained non-alphanumeric characters (e.g. a left-angle bracket plus a few other punctuation characters) with about 10 characters in total.
    Solution: from the web interface I navigated to Settings, Directory Service Managers, and changed the password for "admin" to a simpler password containing only alphanumeric characters.
    Resolution: the registered servers now appear in the DSCC7 web interface as well as the command line. Oddly I can now return the password back to its original value and the servers still appear in the web interface.
    Edited by: nhand42 on Jan 10, 2010 4:53 PM

    English / C 7-bit ASCII.
    The software has been installed inside a Whole Container, and the container was manually sysidcfg'd after the zone's installation (before the software installation) using zlogin -C.
    Edited by: nhand42 on Jan 11, 2010 2:31 PM

  • Sqlloader -350   illegal combination of non alphanumeric character

    hi all,
    i'm using owb 10.2.0.1
    i have a file in my D:\2122008.txt and a table in oracle DB
    created a map from file to table.....
    generated a code and saved in D:\orahome_1\owb\codegen\ctl\Employee.ctl
    deployed in target database...
    when is start from OWB i get the following error
    RPE-01013: SQL Loader reported error condition, number 1.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Mar 6 17:50:01 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-500: Unable to open file (d:\EMPLOYEE.ctl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    so i planned to run by invoking sql*loader..
    this is the generated code
    OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,DIRECT=TRUE,READSIZE=65536,FILE='F_21022008_TXT')
    CONTINUE_LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE '{{FILE_EMP_LOCATION1.RootPath}}{{}}21022008_TXT'
    DISCARDMAX 0
    CONCATENATE 1
    INTO TABLE "DMT_ADMIN"."AZBJ_ONEEMPLOYEE_DATABASE"@"dwhtest"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    FIELDS TERMINATED BY X'09' OPTIONALLY ENCLOSED BY 'X' SKIP 0
    "REC_SRNO" POSITION(1) INTEGER EXTERNAL ,
    "EMPLOYEENUMBER" INTEGER EXTERNAL ,
    "EMPLOYEENAME" CHAR ,
    "EMPDOB" CHAR ,
    "GENDER" CHAR ,
    "DEPARTMENT" CHAR ,
    "DESIGNATION" CHAR ,
    "OPUSCODE" CHAR ,
    "BRANCHCODE" CHAR ,
    "OFFICEMAIL" CHAR ,
    when i execute in sqlldr it is openeing the ctl file but gives the following error
    sql*loader-350: syntax error at line 21
    illegal combination of non-alphanumeric characters
    INTO TABLE "DMT_ADMIN"."AZBJ_ONEEMPLOYEE_DATABASE"@"dwhtest"
    the error is comming at the symbal "@"
    tried out several ways but could'nt resolve the prob
    anyone out there to help me....

    shld i need to keep the source files where OWB server is installed or can i run the process by keeping the files in my client systems local directory?

  • How to discard non alphanumeric key in a string ?

    Dear all,
    To start an application  that i have developped, i would like that the user write its password in the first panel but i want that each time that user enter a character in the string control Hide_Password (see attached picture), this one is automatically convert in a "." to hide the password . The real password is saved in a second string control. It is actually what my vi is doing by using a Key Up event. But now i want to prevent any non alphanumerical character to be enter in the password, especially i do not want that the user can press the menu key as <Ctrl>, <Shift>, <Alt>, <Command>, and <Option> and also the <Left>, <Up>, <Right>, <Down>. I suppose that i have to use Key Down? event by discarding all the key that i do not want but i am sure that there is a more easy way to do it.
    Do you have any idea ?
    Morover, If you think that there is something wrong in my vi, please let me know.
    Thanks
    Philippe 
    Solved!
    Go to Solution.
    Attachments:
    FrontPanel.png ‏12 KB
    BlockDiagram.png ‏43 KB

    The real password is saved in a second string control.
    One thing you shouldn't do is use a (hidden?) String control for data storage.  Use the one control for data input (as a password as others have suggested) and pass the data throughout your program with a wire.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Datatype For Non Public Information

    Hi Guys,
    I have few columns in my database which contains non public information like customer account no ,customer ssn, customer tin.So the requirement comes from the field to encrypt the data while storing ,So could any one please tell me the proper dataptyes to store the encrupted data except the raw type.we are storing password in the raw datatype.
    Please share me some thoughts .
    Many many thanks in advance.
    I am using oracle 11g
    Regards,
    papi
    Edited by: 957590 on May 29, 2013 12:04 AM

    957590 wrote:
    I have few columns in my database which contains non public information like customer account no ,customer ssn, customer tin.So the requirement comes from the field to encrypt the data while storing ,So could any one please tell me the proper dataptyes to store the encrupted data except the raw type.we are storing password in the raw datatype.So does that mean that any user/app/process with select access to a table can also see the encrypted values in the table when selecting rows? Do you want to share secrets, even when encrypted, with strangers?
    Does that mean those with proper access to the data, use decryption in the database and then get the unencrypted private data send to them via a public and non-encrypted network link?
    How is access secured for those allowed access to private data?
    There is much more to security than simply storing data, on disk, in encrypted format.
    As always, requirements are important. What are they? Are they documented? Do they contain measurables and fixed goal posts?

  • Does Oracle User Password can contain non-ASCII characters?

    Hi Experts,
    Can we create a user with password containing non-ASCII characters like "Ro'çá".
    I was able to create a database instance by providing the password for sys as "Ro'çá". But now i am not able to login from command prompt using sqlplus or SQLPLUS Application. I am getting below error:
    C:\Documents and Settings\xyz>sqlplus system/Ro'çá@test
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 4 12:17:33 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    Enter user-name:
    same in case i enclose the password in ""
    C:\Documents and Settings\xyz>sqlplus system/"Ro'çá"@test
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 4 12:17:33 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    Enter user-name:
    same in case i enclose the password in ""
    Also using create user i am not able to create user with password in non-ASCII characters but alter user works and changes the password to non-ASCII characters when enclosed in quotes.
    I wanted to know whether the password can contain non-ASCII characters or not?
    Thanks in advance for your help.

    I don't think that the characters used are allowed. See this doc which only mentions three characters to be used .
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10575/tdpsg_user_accounts.htm#BEICECGF
    I did try the same but it didn't work for me either.
    SQL> select * from V$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> grant connect to user1 identified by Ro'çá;
    ERROR:
    ORA-01756: quoted string not properly terminated
    SQL> grant connect to user1 identified by "Ro'çá";
    Grant succeeded.
    SQL> connect uesr1/"Ro'çá";
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL> connect uesr1/"Ro'çá"
    ERROR:
    ORA-01017: invalid username/password; logon denied
    SQL> connect uesr1/"Ro'çá"
    ERROR:
    ORA-01017: invalid username/password; logon denied
    SQL>HTH
    Aman....

  • Non Keyboard character.

    Hi all,
    I web host a folder of files in the apache. There a file name which contains non keyboard character. I use URLENCODER, it been encoded to %E2%80%98. Sorry that i cannot passte the character here, as is a offline system.
    Although is being encoded, is still returns a 404 when try to access the files. Anyone met this issue before?
    By the way, what is the culture? Should i really allow all these non-keyboard character?
    Regards,
    becks

    becks wrote:
    URLencoder is java.Yeah I know.
    Just wondering how other people do it as well? I feel that should not let users copy paste those funny character into the system.Well it's not a very good system if it doesn't support Unicode. It's not that big an effort after all. Of course if you're not familiar with character encoding and unicode, I recommend you read this:
    http://www.joelonsoftware.com/articles/Unicode.html

  • Non- alphanumberic character remove?

    I have a description column with non-alphanumeric characters like,
    '®' , '°' . I want check for these type of characters in my query & remove them.
    Thank you

    Thanks but i want to remove only the '®' and keep the comma
    ELEE, SILVE®, 120 AMP should return to me ELEE, SILVEÂ, 120 AMP
    ® removed
    65° GOUGTCH ASSY 25'' should return *65 GOUGTCH ASSY 25'*
    ° removed
    how do i do this... I am sorry i was wrong in my first post about all non - alpha numeric characters

  • Hot to set the Non-alphanumeric characters attribute?

    Hello,
    I'm developing an asp.net application using the oracle membership provider. I have installed the databse objects in an Oracle 9i and when I try to create a new user, It always asks me to consider at least 1 Non-alphanumeric character in the password, even if I put in the web.config file the minRequiredNonalphanumericCharacters="0" attribute. Is there another way to set the Non-alphanumeric characters to "0".
    Thanks.

    Workaround: set 0 for minRequiredNonalphanumericCharacters attribute in your machine.config for OracleMembershipProvider. The defalt value is 1. The typical location of machine.config is in %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG.

  • Account Codes with non Alphanumeric characters

    I have a customer who has Business Partner Codes which contain non Alphanumeric characters :
    space
    full stop
    apostrophe
    forward slash
    hyphen
    Will this cause issues with the operation of any aspect of Webtools - what if anything should I watch out for since these cannot be changed?

    Thanks for your response. The form method is "post". The only thing that the CFM handler does with this field (gametestexperience) is include it at the bottom of an email message:
    <CFMAIL TO="[email protected]"
    FROM="#email#"
    SUBJECT="Tester Application"
    type="html"
    server = "Cluster9.us.messagelabs.com">
      Automatically logged from the internet form:<p><p>
    <table>
    <tr><td>EmailFrom</td><td>#email#</td>
    <tr><td>From</td><td>#firstName# #lastName#</td></tr>
    <tr><td>Sent</td><td>#DateFormat(Now())#</td></tr>
    <tr><td>Referrer</td><td>#referer#</td></tr>
    <tr><td>Confirmation</td><td>#agree1#, #agree2#, #agree3#, #agree4#, #agree5#</td></tr>
    <tr><td>FamilyCompetitor</td><td>#familycompetitor#</td></tr>
    <tr><td>FamilyWork</td><td>#familywork#</td></tr>
    <tr><td>ReferredBy</td><td>#referredBy#</td></tr>
    <tr><td>RefererDetails</td><td>#refererdetails#</td></tr>
    <tr><td>FirstName</td><td>#firstName#</td></tr>
    <tr><td>LastName</td><td>#lastName#</td></tr>
    <tr><td>Email</td><td>#email#</td></tr>
    <tr><td>TelephoneHome</td><td>#telephoneHome#</td></tr>
    <tr><td>TelephoneCell</td><td>#telephoneCell#</td></tr>
    <tr><td>TelephoneDay</td><td>#telephoneDay#</td></tr>
    <tr><td>City</td><td>#homeTown#</td></tr>
    <tr><td>Employment</td><td>#employment#</td></tr>
    <tr><td>GamerType</td><td>#gamerType#</td></tr>
    <tr><td>GamerStyle</td><td>#gamerStyle#</td></tr>
    <tr><td>HoursPerWeek</td><td>#hoursPerWeek#</td></tr>
    <tr><td>PreferredGenres</td><td>#preferredGenres#</td></tr>
    <tr><td>Consoles</td><td>#console#</td></tr>
    <tr><td>GamesPlayed</td><td>#gameplayed#</td></tr>
    <tr><td>Available</td><td>#available#</td></tr>
    <tr><td>TestedBefore</td><td>#testedBefore#</td></tr>
    <tr><td>TestingExperience</td><td>#gametestexperience#</td></tr>
    </table>
      Thanks,<P>
      Focus Test Team!<P>
    </CFMAIL>

  • Is Linksys WRT54GH SSID can contains the non-ascii character?

    is Linksys WRT54GH SSID can contains the non-ascii character?
    we need to use it for our wireless testing, but i dont know if the SSID can contains non-ascii.
    anybody can help me? hurry, i will wait answer online.
    thanks in advance!
    Solved!
    Go to Solution.

    thank you  very much, Ricewind
    SSID cant contain non-ascii characters, it make me sad and disappointed
    why we can  set T-link router SSID with non-ascii characters?

  • Search for description containing non-English chars -- ?

    Hello!
    I've implemented a search class, which allows customers to search folders/documents by name, owner, description, etc.
    And here's the problem: if description contains non-English (Russian, in my case) characters, search does not work! Everything (AS infrastructure, CM SDK DB, etc) was installed using UTF-8 Unicode charset. When I debug the code, I see that when I build AttributeQualification and later compose a comples SearchQualification, value in these is correct, but when I call getSQL(), I see string like this:
    ... ( nls_upper(ALIASDOCUMENT.DESCRIPTION) LIKE nls_upper('????') ) ...
    So it seems as if SQL converted passed UNICODE value into ANSI string, and since server's system language is English, my Russian letters were lost -- ?
    Can anybody shed some light here? Is there a way to search for UNICODE descriptions (and content, for that matter)?
    Thanks,
    Sasha.

    Hi Sasha,
    I want you to try the following code. It should output the file description and query to a text file. Use internet explorer / or notepad to open this file and ****specify that the file encoding is UTF8.*****
    thanks,
    matt.
    java -classpath ...blah blah.. RussianSearch parameterfile=c\cmsdkparameters.txt
    cmsdkparameters.txt contains:
    Username = system
    Password = oracle9i
    SchemaPassword = cmsdk
    Domain = ifs://ifspm-sun2.us.oracle.com:1521:mjs92.us.oracle.com:cmsdk903
    ServiceConfiguration = SmallServiceConfiguration
    Service = TestService
    import oracle.ifs.beans.LibraryService;
    import oracle.ifs.beans.LibrarySession;
    import oracle.ifs.beans.ClassObject;
    import oracle.ifs.beans.Document;
    import oracle.ifs.beans.DocumentDefinition;
    import oracle.ifs.beans.Folder;
    import oracle.ifs.beans.FolderDefinition;
    import oracle.ifs.beans.LibraryObject;
    import oracle.ifs.beans.PublicObject;
    import oracle.ifs.beans.Search;
    import oracle.ifs.beans.SearchResultObject;
    import oracle.ifs.common.IfsException;
    import oracle.ifs.common.AttributeValue;
    import oracle.ifs.common.CleartextCredential;
    import oracle.ifs.common.Credential;
    import oracle.ifs.common.ParameterTable;
    import oracle.ifs.search.AttributeQualification;
    import oracle.ifs.search.AttributeSearchSpecification;
    import oracle.ifs.search.SearchClassSpecification;
    import oracle.ifs.search.SearchSortSpecification;
    import java.io.FileOutputStream;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.util.Hashtable;
    import java.util.Vector;
    * Copyright (c) 2003 Oracle Corporation. All rights reserved.
    * Matt Shannon.
    * Description:
    *  Test searching in Russian Language
    *  View output file in notepad or IE - make sure to specify character
    *  set of document to be UTF8 when opening.
    public class RussianSearch implements Runnable
      // set to 'false' to prevent the class from freeing objects that it creates
      public static final boolean performCleanup = true;
      protected ParameterTable m_parametertable;
      private Vector m_ObjectsRequiringCleanup; 
      public RussianSearch(String[] args)
        // parameter file is retrieved through command line argument parameterfile=
        m_parametertable = new ParameterTable(args, "parameterfile");
      public static void main(String[] args)
        new Thread(new RussianSearch(args)).start();
       *   This is where you write your test program.
      public void run()
        LibraryService service = startService();
        LibrarySession session = establishSession(service);
        if (session == null)
          return;
        try
          DocumentDefinition ddef = new DocumentDefinition(session);
          ddef.setAttribute(PublicObject.NAME_ATTRIBUTE,
            AttributeValue.newAttributeValue("blah.txt"));
          ddef.setAttribute(PublicObject.DESCRIPTION_ATTRIBUTE,
            AttributeValue.newAttributeValue("&#1071; &#1089;&#1082;&#1091;&#1095;&#1072;&#1102; &#1087;&#1086; &#1088;&#1086;&#1076;&#1080;&#1085;&#1077;"));
          ddef.setEmptyContent();
          Document newdoc = (Document) session.createPublicObject(ddef);
          addObjectRequiringCleanup(newdoc);
          /*  Construct AttributeSearchSpecification.
           *  Attribute based conditions are allowed, context conditions are not!
          AttributeSearchSpecification attrSrchSpec =
            new AttributeSearchSpecification();
          /*  Construct SearchClassSpecification.
           *  This represents the FROM and SELECT clauses of the query.
          SearchClassSpecification srchClsSpec = new SearchClassSpecification();
          srchClsSpec.addSearchClass(Document.CLASS_NAME);      // from clause
          srchClsSpec.addResultClass(Document.CLASS_NAME);      // select clause
          /*  Construct SearchSortSpecification.
           *  This represents the ORDER BY clause of the query.
          SearchSortSpecification srchSortSpec = new SearchSortSpecification();
          //  upper case ascending sort on Name
          srchSortSpec.add(Document.CLASS_NAME, PublicObject.NAME_ATTRIBUTE,
            SearchSortSpecification.ASCENDING, "nls_upper");
          /*  AttributeQualification is a WHERE clause component representing an
           *  attribute condition.
          // scalar AttributeQualification - name like '%.html'
          AttributeQualification aq = new AttributeQualification();
          aq.setAttribute(Document.CLASS_NAME, PublicObject.DESCRIPTION_ATTRIBUTE);
          aq.setOperatorType(AttributeQualification.LIKE);
          aq.setValue("%&#1088;&#1086;&#1076;&#1080;&#1085;&#1077;");
          // set SELECT & FROM clauses
          attrSrchSpec.setSearchClassSpecification(srchClsSpec);
          // set ORDER BY clause
          attrSrchSpec.setSearchSortSpecification(srchSortSpec);
           // set WHERE clause
          attrSrchSpec.setSearchQualification(aq);
          /* Construct Search, supply SearchSpecification */
          Search s = new Search(session,attrSrchSpec);
          System.out.println("File encoding system property: "+System.getProperty("file.encoding"));
          boolean append = false;
          FileOutputStream fos = new FileOutputStream("c:/test.txt",append);
          OutputStreamWriter osw = new OutputStreamWriter(fos);
          System.out.println("Default character encoding: "+osw.getEncoding());
          osw = new OutputStreamWriter(fos,"UTF8");
          System.out.println("New character encoding: "+osw.getEncoding());
          PrintWriter out = new PrintWriter(osw,true);
          out.println(s.getSQL());
          SearchResultObject obj = null;
          // Open Search!
          s.open();
          try
             * A SearchResultObject encapsulates a row of a search result.  It
             * contains 1 or more LibraryObjects (depending on number of result
             * classes specified).
            while ( (obj = s.next()) != null )
              Document d = (Document)(obj.getLibraryObject(Document.CLASS_NAME));
              out.println(d.getName() + " " + d.getDescription());
          catch (Throwable e)
            if  ((e instanceof IfsException) &&
              (((IfsException)e).containsErrorCode(22000)))
            else
              System.out.println("Unexpected exception occurred in selector cursor");
              System.out.println((e instanceof IfsException)
                ? ((IfsException)e).toLocalizedString()
                : e.toString());
          finally
            out.close();
            if (performCleanup)
              cleanup();
            s.close();
            s.dispose();
        catch (Throwable e)
          System.out.println("Fatal exception occurred in run():");
          System.out.println((e instanceof IfsException)
            ? ((IfsException)e).toLocalizedString()
            : e.toString());
        finally
          disconnectSession(session);
      public LibraryService startService()
        String schemapassword = m_parametertable.getString("SchemaPassword");
        String domain = m_parametertable.getString("Domain");
        String servicename = m_parametertable.getString("Service",domain);
        String serviceconfiguration =
          m_parametertable.getString(
            "ServiceConfiguration","SmallServiceConfiguration"
        LibraryService service = null;
        try
          if (servicename != null &&
            LibraryService.isServiceStarted(servicename))
            // The service name was specified, and is already running.
            // So just use it.
            System.out.println("Service already running: "+servicename);
            service = LibraryService.findService(servicename);
            System.out.println("Existing service retrieved");
          else
            service = LibraryService.startService(
              servicename, schemapassword, serviceconfiguration, domain);
            System.out.println("Service started: '"+servicename+
              "' (version: "+service.getVersionString()+")");
        catch (Throwable e)
          System.out.println("Unable to start service:");
          System.out.println((e instanceof IfsException)
            ? ((IfsException)e).toLocalizedString()
            : e.toString());
        return service;
      public LibrarySession establishSession(LibraryService service)
        String username = m_parametertable.getString("Username");
        String password = m_parametertable.getString("Password");
        return establishSession(service, username, password);
      public LibrarySession establishSession
        LibraryService service,
        String username,
        String password
        LibrarySession session = null;
        try
          CleartextCredential cred = new CleartextCredential(username,
            password);
          session = establishSession(service, cred);
        catch (Throwable e)
          System.out.println("Unable to create credential:");
          System.out.println((e instanceof IfsException)
            ? ((IfsException)e).toLocalizedString()
            : e.toString());
        return session;
      public LibrarySession establishSession
        LibraryService service,
        Credential cred
        LibrarySession session = null;
        if (service != null)
          try
            String username = cred.getName();
            session = service.connect(cred, null);
            System.out.println("Session established for " + username);
          catch (Throwable e)
            System.out.println("Unable to create session:");
            System.out.println((e instanceof IfsException)
              ? ((IfsException)e).toLocalizedString()
              : e.toString());
        return session;
      public void disconnectSession(LibrarySession session)
        System.out.println("Disconnecting session");
        try
          session.disconnect();
        catch (Throwable e)
          System.out.println("Error disconnecting session:");
          System.out.println((e instanceof IfsException)
            ? ((IfsException)e).toLocalizedString()
            : e.toString());
      public void addObjectRequiringCleanup(LibraryObject lo)
        Vector v = getObjectsRequiringCleanupVector();
        v.addElement(lo);
      private Vector getObjectsRequiringCleanupVector()
        if (m_ObjectsRequiringCleanup == null)
          m_ObjectsRequiringCleanup = new Vector();
        return m_ObjectsRequiringCleanup;
       * Frees objects that were marked as requiring clean up
      public void cleanup()
        Vector v = getObjectsRequiringCleanupVector();
        System.out.println("Cleanup - delete objects created during the session");
        int count = (v == null) ? 0 : v.size();
        System.out.println("# of objects to free: "+count);
        // Free the objects in reverse order from which they were added
        for (int i = count - 1; i >= 0; i--)
          LibraryObject lo = (LibraryObject)v.elementAt(i);
          try
            discardObject(lo);
          catch (Exception e)
            System.out.println("Unable to discard an object during cleanup - continuing...");
      public void discardObject(LibraryObject lo) throws IfsException
        if (lo != null)
          try
            System.out.println("Attempting to free: "+getDisplayName(lo));
            LibrarySession session = lo.getSession();
            if (lo instanceof Folder)
              System.out.println("Attempting to free Folder with Deep Option!");
              // free Folder using "Deep" option to free
              // all items in the folder, and all of their items, etc.
              Folder folder = (Folder)lo;
              FolderDefinition def = new FolderDefinition(session);
              def.setFolderDepthOption(
                Folder.SYSTEMOPTIONVALUE_FOLDER_DEPTH_DEEPEST);
              folder.free(def); // removes object from the repository, with options
            else
              // just a regular free
              lo.free();
          catch (Exception e)
            System.out.println("Unable to free an object during cleanup - continuing");
            System.out.println((e instanceof IfsException)
              ? ((IfsException)e).toLocalizedString()
              : e.toString());
      public String getDisplayName(LibraryObject lo)
        throws IfsException
        String displayName;
        if (lo != null)
          displayName = lo.getClassObject().getName()
            + " '" + lo.getName() + "'";
        else
          displayName = "<null object>";
        return displayName;
    }

  • ALV Grid bug when dealing with non-ASCII character

    Dear all,
    I have a requirement to display user's remarks on ALV.  The data element of the remarks column is TEXT200.  I know that each column in an ALV Grid can display at most 128 characters.  Since my SAP is an Unicode system, I expect that each column in my ALV Grid can display 128 Chinese characters, too.  However, the ALV Grid only display 42 Chinese characters at most.  Is this a bug in ALV Grid?  How can I fix it?
    I did a small experiment.  The results are listed below.  My version is Net Weaver 7.01.  The results show that the bug does not exist in ALV List.  However, my user prefers ALV Grid, which is more beautiful and elegant.
    Type of ALV
    Max number of
    ASCII character
    in an ALV column
    Max number of
    non-ASCII character
    in an ALV column
    REUSE_ALV_GRID_DISPLAY
    128
    42 Chinese characters
    CL_SALV_TABLE
    128
    42 Chinese characters
    CL_GUI_ALV_GRID
    128
    42 Chinese characters
    REUSE_ALV_LIST_DISPLAY
    132
    132 Chinese characters
    If you encounter the bug, please post your solution.  Thanks a lot. 

    It looks like limitation of ALV grid cell, which can contain up to 128 bytes in SAP gui.
    Your unicode characters are probably 3 bytes each.
    Check OSS Note 910300 for more detailed info.
    EDIT: Note 1401711 seems to be a correction for your issue It allows to use 128 characters (even if they take more than 128 bytes).

  • Unicode value of a non-ASCII character

    Hi,
    Suppose, the unicode value of the character &#2381; is '\u094d'.
    Is there any Java function which can get this unicode value of a non-ASCII character.
    Like:
    char c='&#2381;';
    String s=convertToUnicode(c);
    System.out.println("The unicode value is "+ s);
    Output:
    The unicode value is \u094d
    Thanks in advance

    Ranjan_Yengkhom wrote:
    I have tried with the parameter
    c:\ javac -encoding utf8 filename.java
    Still I am getting the same print i.e. \u3fIf it comes out as "\u3f" (instead of failing to compile or any other value), then your source code already contains the question mark. So you already saved it wrong and have to re-type it (at least the single character).
    >
    Then I studied one tutorial regarding this issue
    http://vietunicode.sourceforge.net/howto/java/encoding.html
    It says that we need to save the java file in UTF-8 format. I have explored most of the editors like netbean, eclipse, JCreator, etc... there is no option to save the java file in UTF-8 format.That's one way. But since that is so problematic (you'll have to remember/make sure to always save it that way and to compile it using the correct switch), the better solution by far is not to use any non-ASCII characters in your source code.
    I already told you two possible ways to achieve that: unicode escapes or externalized strings.
    Also read http://www.joelonsoftware.com/articles/Unicode.html (just because it's related, essential information and I just posted that link somewhere else).

Maybe you are looking for