Comparing special characters

How to compare the special characters ?
I have used compareNocase but still I am unable to compare.
Example :
I want to compare these values
1.Master™ selvan
2.Master®selvan
thanks in Advance
Anbu

Hi Anbu,
Make a try with this...
<cfset string1="Master™ selvan">
<cfset string2="Master® selvan">
<cfset tobase_string1=ToBase64(string1)>
<cfset tobase_string2=ToBase64(string2)>
<cfoutput>
Base64 Representation of Strings : <br><br>
String 1 : Actual Value : #string1# Converted Value :
#tobase_string1# <br>
String 2 : Actual Value : #string2# Converted Value :
#tobase_string2# <br><br>
</cfoutput>
Equality : <cfif #tobase_string1# eq
#tobase_string2#><cfoutput>Equal</cfoutput><cfelse><cfoutput>Not
Equal</cfoutput></cfif>

Similar Messages

  • Comparing special characters in UNIX

    #!/usr/bin/ksh
    v_v_delimiter='|'
    v_v_delimiter1='|'
    echo $v_v_delimiter
    echo $v_v_delimiter1
    if [ "$v_v_delimiter" = "$v_v_delimeter1" ]
    then
    echo if
    else
    echo else2
    fi
    echo $v_v_delimiter
    The above script gives output as
    |
    |
    else2
    |
    This is incorrect as it should go in "IF" condition.
    Plz help.
    Thanks in advance.

    mb.sharma, please enclose your code in code tags, so it's not altered and reformatted. it's now as good as unreadable.
    do that by placing the tag '{c o d e}' without the quotes and spaces before and after the code.

  • Special characters are not shown in compare document report in Acrobat X

    Hi All,
    I have a pdf document which is having some special characters like üὄ. Now I have updated the document with few corrections and while compare document in Acrobat X special characters are not shown in the report.
    Can any one please look into this and give suggestion.

    Hi Steve,
    Thanks for your reply.
    Platform - PC
    Application - 3B2 and Acrobat 9
    So far we have seen this kind of issue in only one document. In the below screenshot you can see 2 pdf files, the right side one is my MS pdf and the left side one is the exported pdf from 3B2 application both the files having the special characters such as . I just did the text comparison however both   and  is missing in the exported pdf but the reports shown the changes for  characters only wherever the  charactes is missing the report not shown the changes properly(See highlighted in yellow).
    Please let me know if you need more deatails.

  • How to compare two strings whether both are equal while ignoring the difference in special characters (example: & vs & and many others)?

    I attempted to compare two strings whether they are equal or not. They should return true if both are equal.
    One string is based on Taxonomy's Term (i.e. Term.Name) whereas other string is based on String object.
    The problem is that both strings which seem equal return false instead of true. Both string values have different special characters though their special characters are & and &
    Snapshot of different design & same symbols:
    Is it due to different culture or language?
    How to compare two strings whether both are equal while ignoring the difference in special characters (& vs &)?

    Hi Jerioon,
    If you have a list of possible ambiguous characters the job is going to be easy and if (& vs &) are the only charracters in concern awesome.
    You can use the below solution.
    Before comparing pass the variables through a replace function to standarize the char set.
    $Var = Replace($Var,"&","&")
    This is going to make sure you don't end up with ambiguous characters failing the comparison and all the char are "&" in this case.
    Similar technique is used to ignore Character Cases 'a' vs. 'A'
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • How to preserve special characters in dynamic textfield for text comparison?

    The problem is as follows:
    Since I mostly develop for multiple languages I am forced to have dynamic textfields in my buttons which contain three lines (to account for the differnt text.lengths in different languages).
    I then populate the textfields with strings out of an array or xml and use the textfields contents later in my button class to execute different code depending on the textfields content.
    This works fine as long as I don`t use any special characters, like for example "\n".
    var labels:Array = ["\nLABEL1","LABEL\n\n2"];
    switch (e.currentTarget.txt.text)
                    case labels[0]:
                        doSomething();
                        break;
                    case labels[1]:
                        doSomethingElse();
                        break;
    shows the right thing in the button label (breaks the text were I want it)
    but stops to work
    (with htmlText &  <br> its the same)
    my workaround for the moment is to use filler spaces,
    var labels:Array = ["                   LABEL1","LABEL                                                                        2"];
    but that`s obviously ugly to setUp and requires a lot of trial/error to get it right for all languages.
    Any ideas how to bypass that?

    Bad habits die hard ;-)
    Weird enough spelling the problem out and getting this response from you cleared my head and  I finally got an easy solution.
    I simply attach a dynamic property to the movieclip, copy the array contents into them and instead of using the text-property for comparison I compare the MovieClips fresh created spectext property.
    Voila: Now I can be lazy without too much of a bad conscience.

  • How to handle special characters in metadata?

    I have an implementation in C# to call ACS webservices for a long time. Last week we realized that some special characters in metadata fields are making the package request to not work. Example characters: éë. The response from ACS contains E_ADEPT_DISTRIBUTOR_AUTH. If we remove the special character, the request works as expected.
    I know that characters are working in the jar application but we can't manage to make them work from our C# application.
    Any help is welcome.

    Doing a SHA1-HMAC is relatively simple and there are only two inputs, the key and the message.
    Since you say this works correctly with lower ascii characters, but not with Unicode characters then I would assume you have the key correct and the only thing that is different is the message.  Also since it works correctly with lower ascii characters then you have the  XML infoset serialization correct, so assuming a similiarly sized message (ie take one character and replace with a unicode character), then your problem is going to be in the character encoding.
    I would suggest some healthy paranoia about this, by verifying that the byte stream being hashed is indeed correctly UTF8 encoded by looking at the hex values  (breakpoint in the SHA1-HMAC code) and comparing to a UTF8 table such as  http://www.utf8-chartable.de.

  • 0CUSTOMER Special Characters Error in Load

    Hi Experts,
        I am loading Customer Master data from R/3 into BW via 0CUSTOMER_ATTR extractor. Some user-entered fields in R/3 such as NAME, NAME1, STREET etc have some special characters - which look like a square.
    This data used to come over into BW w/o errors. Now I have added some date fields to the extract eg CREATED_ON. All records that have the special characters now show-up incorrectly; as in ALL fields after the special characters have shifted to the left. So a few characters from CREATED_BY have spilled into CREATED_ON, Telephone Ext has spilled into Telephone Num and so on.
    This is how the data is coming into the PSA from R/3. So I can't even check for special characters in the trans routine. ( The data is already bad in the PSA).I checked RSA3. there is no such spillage on the R/3 side. The spilling of data is happening between R/3 and BW.
    Any Idea whats going on here and how to fix this?
    thanks,
    Kartik.

    I think you have to check infoobject length in BI and the order of the infoobjects in the infosource compared to extractor fields.Any incosistency here may cause the spillage of data.
    The new fields created in R/3 especially with varying lengths of data seems to be causing the trouble..

  • Weblogic 12c Servlet Response - Special characters show up as question mark

    My web app is running on Weblogic 12c (12.1.1) using WebWork + Hibernate. The program streams data (bytes making up a pdf) from a CLOB in an Oracle Database to the AsciiStream of the servlet output response. No exceptions are thrown, but the generated pdf contains blank pages. Comparing the bytes of the generated pdf, special characters are showing up as question marks.
    Some of the bytes read in from the database contain 8 bits (correct data), but the bytes that the servlet return contain only 7 (all bytes with 8 bits become "1111111"). The number of bytes returned from the servlet is correct.
    Code:
    //Response is HttpServletResponse
    response.setContentType("application/pdf");
    response.setHeader("Content-Disposition", "inline; filename=\"test.pdf\"");
    out = response.getOutputStream();
    byte[] buf = new byte[16 * 1024];
    InputStream in = clob.getAsciiStream();
    int size = -1;
    while ((size = in.read(buf)) != -1){
    // buf contains the correct data
    out.write(buf, 0, size);
    // other exception handling code, etc
    out.flush();
    out.close();
    "Correct" pdf byte example:
    10011100
    10011101
    1010111
    1001011
    1101111
    11011011
    Incorrect pdf byte example:
    111111
    111111
    1010111
    1001011
    1101111
    111111
    I have verified that the data read from the CLOB in the database IS correct. My guess is that the Weblogic server has some strange servlet settings that causes the bytes to be written to the servlet output stream incorrectly, or a character encoding issue. Any ideas?
    Edited by: 944705 on Jul 26, 2012 10:17 AM

    Solution found, I'll post the work around to those who might encounter the same problem.
    Somewhere in the layers of technology (webwork or weblogic I'd guess), the servlet response is encoded into UTF-8 regardless. The encoding in the database was ISO-8859-1. Sending ISO encoded bytes by UTF-8 caused the conflicting character codes (anything above 127) to show up as undefined.
    The fix is to decode the input byte array into ISO-8859 string, then encode that string into UTF-8, which can be send by Weblogic.
    isoConvert = new String(buf, "ISO-8859-1");
    out.write(isoConvert.getBytes("UTF-8"), 0, isoConvert.getBytes("UTF-8").length);

  • Issue while generating MD5 if there are any special characters in the CLOB

    Hi Guys,
    I need your help...
    We are using dbms_crypto.hash to generate the MD5 hash value for a CLOB that will be sent to other feeder systems. The feeder systems validate the file by generating the MD5 hash value on their end and compare with the MD5 generated in Oracle and accept the file only if the MD5 hash value matches.
    The MD5 file matches between both the systems except in the case where there are special characters in the CLOB. Somehow, MD5 is prefixing  character before any special character and calculating the MD5 value. In our case, our special characters being ®, §, ™, ©....
    This is a high priority issue for us and it is holding our UAT.
    We are using Oracle 11.2.0.2.0.
    Your response is really appreciated.
    Best Regards
    Gupta

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version.
    >
    We are using dbms_crypto.hash to generate the MD5 hash value for a CLOB that will be sent to other feeder systems. The feeder systems validate the file by generating the MD5 hash value on their end and compare with the MD5 generated in Oracle and accept the file only if the MD5 hash value matches.
    The MD5 file matches between both the systems except in the case where there are special characters in the CLOB. Somehow, MD5 is prefixing  character before any special character and calculating the MD5 value. In our case, our special characters being ®, §, ™, ©....
    >
    See if my reply in this thread addresses your problem.
    Re: MD5 HASH computed from DBMS_CRYPTO does not match .NET MD5
    The fix in almost all of these cases is to understand that the Crypto package always converts everything to AL32UTF8 before hashing.
    ALWAYS.
    ALWAYS.
    ALWAYS.
    Unless the 'other' hash generators (substitute any generator you wish) do it the Oracle way you will NEVER get a match.
    NEVER.
    NEVER.
    NEVER.
    There are no workarounds.

  • How to handle special characters such as apostrophe, ampersant

    Hello All,
    Tools:
    JSP, JSDK 2
    Oracle 8
    Issue:
    If the user supplies a String value inside a text box which has special characters such as apostrophe, while we try to compare that string with some value in the database, the sql error comes up as the sql string will be broken.
    Example:
    input string--> ABC D'OLL
    sql --> "select * from verndor where vendor_name ='ABC D'OLL' "
    Present solution:
    I am reading each input string & look for such special characters. if so, replaces that character with escape character + that character.
    This solution works.
    Problem:
    If there any more efficient way to handle such character??
    At java level or Database level
    Thanks In advance :)

    Use PreparedStatements

  • 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/

  • How do you add special Characters???

    Does anyone know how to add special characters like accents to words in pages '08???

    There are several other threads that deal with this in detail.
    On the Mac since almost day one, most of the accents are created by first typing option plus one of the vowels/consonants, followed by the vowel/consonants to which the accent is added. Some are direct alternatives, try them and see what they do.
    eg
    *Indirect accents*
    option e plus e = é also á, é, í, ó, ú
    option i plus e = ê also î, â, ô, û
    option u plus e = ë, ï, ä, ü, ö
    option n plus n = ñ
    *Direct accents*
    option a = å
    option o plus e = ø
    option c = ç
    option s = ß (now obsoleted)
    option w = ∑ (because it looks like a sideways w)
    option f = ƒ
    option t = †
    option v = √ (square root character, which looks like a v)
    etc
    I have always marvelled at the common sense approach that Apple used compared with the way the Windows programmers did it.
    To delve into the much more intricate world of Unicode characters go to:
    +Menu > Edit > Special Characters…+

  • Compare ASCII Characters

    I scan a barcode and the barcode contains 16 characters.  Using 0 as my first character, I have a single letter (a to z or A to Z, upper or lower case).  In positions 5 and 6 I have two letters (a to z or A to Z).  How do I ensure that the first character is a letter and not a number in TestStand (3.0)?  The second example has two consecutive letters (any combination of, either upper or lower case), how do ensure these two characters are letters and not numbers or special characters? Positions 0, 5 and 6 will always have a letter, never a number and never the same.
    Tony

    If you still want to do it in TestStand, you have Mid(), Asc(), Chr(), <, >, ==, StrComp(), etc.. to manipulate and compare strings and characters.
    For example, it you want to know if a particular character is alphabetic:
    Locals.characterInUpperCase = ToUpper(Mid(Locals.stringOfInterest, Locals.characterIndex, 1)),
    Locals.isAlphabetic = StrComp(Locals.characterInUpperCase , "A") >= 0 && StrComp(Locals.characterInUpperCase , "Z") <= 0
    Admittedly, an IsApha() function would be nice. 

  • XML Publisher report not printing excel output due to special characters

    Hello,
    I am trying to create a xml publisher report which should display the output in excel. But the program completes with a warning status and the output is displayed as XML instead of excel, with some errors "An invalid character was found in text content. Error processing resource " and i think these errors are due to the special characters(eg: city/province - A Coruña, Cáceres). If i give rownum < 10 in my query, where there are no such characters it works fine and i am getting an excel output.
    Tried changing the XML encoding and it doesn't help (both mentioned below)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml version="1.0" encoding="UTF-8"?>
    Do anyone have a solution for this
    Thanks in advance
    Edited by: user10317098 on Jan 16, 2012 10:58 AM

    Hi,
    Check this links that might help you..
    https://forums.oracle.com/thread/1018488
    http://docs.oracle.com/cd/E10091_01/doc/bip.1013/e05000/toc.htm
    Here the Exact solution from Oracle
    In the XML PUBLISHER ADMINISTRATOR Resp..
    Click the administration..
    then Click HTML Output
    Then in the Base Image URI Give the url of your application for example
    http://Test.Test.com:8000/OA_MEDIA/
    And then
    Image File Directory give this as per your application setup
    /u01/app/oracle/apps/apps_st/comn/java/classes/oracle/apps/media/
    Thanks & Regards
    Srikkanth.M

  • How to print Special Characters in Sap-Scripts

    How to print Special Characters in Sap-Scripts
    Thanks,
    Ravi

    Hi
    if u want print special characters we can use hot codes i.e '  '  (single inverted commas). in between these hot codes insert u r special characters.
    write    '    !@#$%^&*( )  '.
    for the above write statement output is
    output is   !@#$%^&*( )

Maybe you are looking for