Characters from VISA not in ascii

I am using ARM Cortex Microcontroller. I am sending the numbers into lab view through usb port.
In such case, the strings obtained from VISA Read are not ascii but i can convert them into unsigned int with the help of string to uint premitive.
The numbers to be sent are continuous and they consist of u8, u16 and also float values.
So the problem here is the conversion. only those value which are defined as u8 are displayed correctly.
How do i convert into appropriate values.
E.g. if the value is integer but greater than 255 i should be able to read and display.
If the value is float i should be able to display the proper float number.
I also tried with scan string premitive, also string to number premitive. They can only read ascii and convert, but the characters i am converting are not ascii.
The characters i am receiving look like boxes and for a value of 0 they are empty space.
To convert a number into ASCII in my microcontroller could also be possible but the requirement here is with lab view. Microcontroller currently has huge load of programs.
I would be happy if someone whould help me in this.
Thanks in advance.
Solved!
Go to Solution.

Sorry for the mistake to write it is string to byte.
The necessary clippings are as below. The second clipping 'read buffer' is from a series of transformation where, first data is 300, second is 1 and third is 1.23. The output for these as seen in the third picture is 44, 1 and 1. Yes, 300-256 = 44, previously i wrote 45.
According to you, do you mean that the first two byte should correspond to 300 ? and also similar for the float (not only one byte value but with several values in consecutive elements of the array)?
I would be happy if similar clips would be avialable.

Similar Messages

  • Cyrillic characters from MySQL not displaying correctly

    I have a flash file that has a dynamic text link which is taking the data from a MySQL database.  Everything is fine when it is receiving standard characters, but when I try to use Cyrillic characters I just get ???? instead.
    I've tried setting the collation to everything from windows 1251 to UTF8 (and variants).  I've also tried setting the text link to fonts ranging from Arial to Arial CYR, Verdana etc and even embedding the char sets into the file.
    Nothing seems to be working - does anyone have any ideas about what I can do?
    Thanks!!

    .oO(Daniel Sofer)
    >I have a static site in Japanese that is working fine in
    Dreamweaver. I'm
    >trying to add a database connection with php/mysql, but
    the connection between
    >my page and the database is garbling the text (moji bake)
    in both directions.
    You also have to define the connection character set, so the
    data will
    be transfered correctly.
    10.4. Connection Character Sets and Collations
    http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
    I do this by sending a
    SET NAMES 'utf8'
    to the database right after establishing the connection.
    Additionally
    your server has to send the correct charset parameter to the
    browser.
    In PHP you can achieve this with a header() call:
    header('Content-type: text/html; charset=UTF-8');
    HTH
    Micha

  • I just recently purchased 3 songs from itunes not knowing that I had no money on my debit card (visa) left. My iphone wont let me update my apps and says that there was a billing problem with my last purchase. I dont know what I am supposed to do!

    I just recently purchased 3 songs from itunes not knowing that I had no money on my debit card (visa) left. My iphone wont let me update my apps and says that there was a billing problem with my last purchase. I dont know what I am supposed to do! I dont understand why it worked in the first place when it wasn't supposed to!

    There seems to be a billing problem with the iTS.  I've been trying to make purchases today (Dec 9th) too and it reports either the iTS can not process payments or it says my card was declined. I even changed the payment method to Paypal (which is never declined) and still no go.
    I don't think it is "you" but a problem at Apple.  Some popular new apps were released recently like Logic Pro and perhaps they're getting bombarded as they did when Lion was released.
    Wait a few hours and then try again.

  • I have a MacBook purchased in 2009 with Snow Leopard. I tried to access "special characters" from the Finder menu and an intermittent blank pop ups and will not stop. It also happens when I run Word or Pages.

    The blank pop up began as I tried to access "special characters" from the finder menu. I restarted, turned off and restarted and it did not work. It interferes with any application because I cannot work fast. Every new step takes a few seconds longer such as saving, finding text, check spelling and many more. I am desperate to solve this. Thanks in advance for any help given.
    Consuelo Corretjer

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • Replace not latin characters from file name.

    Dear friends,
    I tried a lot but even after reading the documentation about all the available CF functions I could not find a way  to accomplish this:
    As you already know from my previous post I'm trying to finish an application which manages multiple images. I have reached a really good point and I was ready to implement the solutions you suggest on this post when the client did something marvellous. He uploaded some images named "Εικόνα 123.jpg" (Image 123.jpg in English) which actually broke the Flex application that retrieves the images because the firewall does not allow high bit characters to go through. I now need to add a function that will evaluate every character in the file name individually and it will remove or replace (I do not care) all the characters that are not latin or numbers (spaces, greek characters, special characters, etc). As I've already said no known function is able to do that (as far as I know of course) and I guess that the solution could be hiding in regular expressions which is not my strong point. So I need your help here.
    Thank you in advance,
    John

    Thanks Ian,
    I cannot figure out how to use asc() function for this. I will have to run a test in every single character and replace the invalid ones but I will never now the actual string length (how many characters each image name will have) and I will  possibly end up destroying the extensions (.jpg) as well. To make it a little more complicated let me tell you that I will have to run this twice. Once for the full image path (ie d:\company\aptown\images\Εικόνα 123.jpg) in which I will have to change only the ...Εικόνα 123... part and not anything else, and once for a comma separated list of the image names (ie Εικόνα 123.jpg, Εικόνα 124.jpg, Εικόνα 125.jpg, Εικόνα 126.jpg). And don't be misleaded from the pattern. The customer may upload an image named with a complitely different way using invalid characters though, for example "Αντίγραφο της Εικόνας 123.jpg" (Copy of the image 123.jpg in English).
    Seems to be impossible ,
    I hope it is not.
    Yannis

  • Removing Non-Ascii Characters from a String

    Hi Everyone,
    I would like to remove all NON-ASCII characters from a large string. For example, I am taking text from websites and would like to remove all the strange arabic and asian characters. How can I accomplish this?
    Thank you in advance.

    I would like to remove all NON-ASCII characters from a large string. I don't know if its a good method but try this:
    str="\u6789gj";
    output="";
    for(char c:str.toCharArray()){
         if((c&(char)0xff00)==0){
              output=output+c;
    System.out.println(output);
    all the strange arabic and asian characters.Don't call them so.... I am an Indian Muslim ;-) ....
    Thanks!

  • Japanese characters from args giving question marks on Japanese OS

    Hi,
    We are internationalising our product to japanese, and one of the features is to be able to open a file containing japanese characters from a double click on a japanese windows OS.
    The double click is set up in the registry, and indeed it works properly for most characters. There are a few characters though (unicode character 20060 among them) that it doesn't work for, and what happens is that between the double clicking of the file, and the command line name of the file to open ("%1" in the registry / args[0] in java), the character in question is converted into the literal character for "?" (ascii 63), and java can't open the file.
    Testing wordpad directly with this character is fine, the file opens. I've written a simple C++ app and a simple JAVA app which fork wordpad with the fileName param passed to it from the registry, and it didn't open the file passed because of that character.
    So our java application, a simple java program and a simple C++ program can't resolve the fileName passed to it because of this character.
    The thing is, wordpad is using the same regedit method to get its parameters as we do ("appName.exe" "%1" in shell/open/command) and it opens files containing this character without a problem.
    Any ideas on what I'm missing?
    Thanks very much
    Jack

    Hi,
    We are internationalising our product to japanese,
    and one of the features is to be able to open a file
    containing japanese characters from a double click on
    a japanese windows OS.
    The double click is set up in the registry, and
    indeed it works properly for most characters. There
    are a few characters though (unicode character 20060
    among them) that it doesn't work for, and what
    happens is that between the double clicking of the
    file, and the command line name of the file to open
    ("%1" in the registry / args[0] in java), the
    character in question is converted into the literal
    character for "?" (ascii 63), and java can't open the
    file.
    Testing wordpad directly with this character is fine,
    the file opens. I've written a simple C++ app and a
    simple JAVA app which fork wordpad with the fileName
    param passed to it from the registry, and it didn't
    open the file passed because of that character.
    So our java application, a simple java program and a
    simple C++ program can't resolve the fileName passed
    to it because of this character.
    The thing is, wordpad is using the same regedit
    method to get its parameters as we do ("appName.exe"
    "%1" in shell/open/command) and it opens files
    containing this character without a problem.
    Any ideas on what I'm missing?
    Thanks very much
    JackUnicode 20060 belongs to an extended part of JIS Kanji code set and there can be many
    applications or systems that do not support those characters. Shift_JIS doesn't and
    EUC-JP use 24 bit code for representig those chars which, unfortunately, aren't supported
    by most exixting apps.

  • Removing non-numeric characters from string

    Hi there,
    I need to have the ability to remove non-numeric characters from a string and I do not know how to do this.
    Does any one know a way?
    Example:
    Present String: (02)-2345-4607
    Required String: 0223454607
    Thanks in advance

    Dear NickM
    Try this this will work...........
    create or replace function char2num(mstring in varchar2) return integer
    is
    -- Function to remove Special characters and alphebets from phone no. string field
    -- Author - Valid Bharde.(India-Mumbai)
    -- Date :- 20 Sept 2006.
    -- This Function will return numeric representation.
    -- The Folowing program is gifted to NickM with respect to his post on oracle site regarding Removing non-numeric characters from string on the said date
    mstatus number :=0;
    mnum number:=0;
    mrefstring varchar2(50);
    begin
    mnum := length(mstring);
    for x in 1..mnum loop
    if (ASCII(substr(upper(mstring),x,1)) >= 48 and ASCII(substr(upper(mstring),x,1)) <= 57) then
    mrefstring := mrefstring || substr(mstring,x,1);
    end if;
    end loop;
    return mrefstring;
    end;
    copy the above program and use it at function for example
    SQL> select char2num('(022)-453452781') from dual;
    CHAR2NUM('(022)-453452781')
    22453452781
    Chao!!!

  • Remove LF characters from file names

    I have a folder full of files with filenames that contain LF character (ASCII code 10).  I want to use Automator's "Replace Text" funcion to remove these non printing characters from file names.  Is there a way to do it?
    If automator is not able to do this task, I will take a bash script or applescript solution as well...

    Take a look at: http://stackoverflow.com/questions/4417588/sed-command-to-fix-filenames-in-a-dir ectory
    (I changed  tr -d "\r\n" to tr -d "\n", but try both)
    for f in ~/Desktop/*
    do
        new="$(printf %s "$f" | tr -d "\n")"
        if [ "$f" != "$new" ]; then
            mv "$f" "$new"
        fi
    done

  • Reading characters from a text file into a multidimensional array?

    I have an array, maze[][] that is to be filled with characters from a text file. I've got most of the program worked out (i think) but can't test it because I am reading my file incorrectly. However, I'm running into major headaches with this part of the program.
    The text file looks like this: (It is meant to be a maze, 19 is the size of the maze(assumed to be square). is free space, # is block, s is start, x is finish)
    This didn't paste evenly, but thats not a big deal. Just giving an idea.
    19
    5..................
    And my constructor looks like follows, I've tried zillions of things with the input.hasNext() and hasNextLine() to no avail.
    Code:
    //Scanner to read file
    Scanner input = null;
    try{
    input = new Scanner(fileName);
    }catch(RuntimeException e) {
    System.err.println("Couldn't find the file");
    System.exit(0);
    //Set the size of the maze
    while(input.hasNextInt())
    size = input.nextInt();
    //Set Limits on coordinates
    Coordinates.setLimits(size);
    //Set the maze[][] array equal to this size
    maze = new char[size][size];
    //Fill the Array with maze values
    for(int i = 0; i < maze.length; i++)
    for(int x = 0; x < maze.length; x++)
    if(input.hasNextLine())
    String insert = input.nextLine();
    maze[i][x] = insert.charAt(x);
    Any advice would be loved =D

    Code-tags sometimes cause wonders, I replaced # with *, as the code tags interprets # as comment, which looks odd:
    ******...*.........To your code: Did you test it step by step, to find out about what is read? You could either use a debugger (e.g., if you have an IDE) or system outs to get a clue. First thing to check would be, if the maze size is read correctly. Further, the following loops look odd:for(int i = 0; i < maze.length; i++) {
        for(int x = 0; x < maze.length; x++) {
            if (input.hasNextLine()) {
                String insert = input.nextLine();
                maze[x] = insert.charAt(x);
    }Shouldn't the nextLine test and assignment be in the outer loop? And assignment be to each maze's inner array? Like so:for(int i = 0; i < maze.length; i++) {
        if (input.hasNextLine()) {
            String insert = input.nextLine();
            for(int x = 0; x < insert.size(); x++) {
                maze[i][x] = insert.charAt(x);
    }Otherwise, only one character per line is read and storing a character actually should fail.

  • How to send non-latin unicode characters from Flex application to a web service?

    Hi,
    I am creating an XML containing data entered by user into a TextInput. The XML is sent then to HTTPService.
    I've tried this
    var xml : XML = <title>{_title}</title>;
    and this
    var xml : XML = new XML("<title>" + _title + "</title>");
    _title variable is filled with string taken from TextInput.
    When user enters non-latin characters (e.g. russian) the web service responds that XML contains characters that are not UTF-8.
    I run a sniffer and found that non-printable characters are sent to the web service like
    <title>����</title>
    How can I encode non-latin characters to UTF-8?
    I have an idea to use ByteArray and pair of functions readMultiByte / writeMultiByte (to write in current character set and read UTF-8) but I need to determine the current character set Flex (or TextInput) is using.
    Can anyone help convert the characters?
    Thanks in advance,
    best regards,
    Sergey.

    Found tha answer myself: set System.useCodePage to false

  • Read characters from console.

    Hii
    I'm trying for 2 days to read characters from console on the fly, but it didn't work.
    I want to read each char that user press on line and without waiting for the Enter button. It's like an keyboard event but there is no GUI.
    I will appreciate any help.
    Thanks.

    I don't understund what you really want to do.it is possible mesure the time between each char type using the last code :
    char charPressed='\0';
    String line="";
    while(charPressed != '\n')
    try
    // start time
    charPressed =(char) System.in.read();
    line += charPressed;
    // end time
    // want to get out
    if(...) break;
    catch(IOException ioex) {ioex.printStackTrace();}
    Sorry, but your code doesn't measure the time between each char type.
    The function read waits for the "enter" key, and just after pressing enter your code will start to read all the chars you typed before "enter", so it won't do it.
    Read function will not help in this subject.

  • Selecting the first 4000 characters from a tag in an xml file

    Oracle Enterprise Edition 11.1.0.7 64 bit (Jan 2012 CPU applied)
    Windows 2003 64 bit
    We have an XML file with the following sample format.
    <?xml version="1.0"?>
    <HR>
    <EMP>
    <FNAME>JOHN</FNAME>
    <LNAME>DOE</LNAME>
    <COMMENT>Comment with less than 4000 characters</COMMENT>
    </EMP>
    <EMP>
    <FNAME>JANE</FNAME>
    <LNAME>DOE</LNAME>
    <COMMENT>Comment with more than 4000 characters</COMMENT>
    </EMP>
    </HR>
    The query below
    (full disclosure: which I took from odie_63's response in Creating External Table using Xml Dataset - how to include null values? and added the CURSOR_SHARING_EXACT hint on the top)
    works when the contents of the <Comment> tag are smaller than 4000 characters. If it is more than 4000 I get
    ORA-01706: user function result value was too large
    SELECT /*+ CURSOR_SHARING_EXACT */
    FROM XMLTable(
    '/HR/EMP'
    passing xmltype( bfilename('DATA_PUMP_DIR','emp.xml'), nls_charset_id('CHAR_CS') )
    columns
    first_name varchar2(30) path 'FNAME',
    last_name varchar2(30) path 'LNAME',
    comments varchar2(4000) path 'COMMENT'
    I found another query where someone was doing a substring (I think to get only the first 4000 characters from the tag) here.
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14638197 (See OP's post)
    TERMINATION_DATE VARCHAR(32) path 'TerminateDate/substring(text(), 1, 32)',
    So I updated my query to be
    SELECT /*+ CURSOR_SHARING_EXACT */
    FROM XMLTable(
    '/HR/EMP'
    passing xmltype( bfilename('DATA_PUMP_DIR','emp.xml'), nls_charset_id('CHAR_CS') )
    columns
    first_name varchar2(30) path 'FNAME',
    last_name varchar2(30) path 'LNAME',
    comments varchar2(4000) path 'COMMENT/substring(text(),1,4000)'
    The query runs without an error when the <comment> tag has 4000 or less characters but still errors out with it is more than 4000.
    I found an alternative method to do the SUBSTRING here in Herald ten Dam's reponse in Re: A view over XML that is not 1:1
    code varchar2(30) path 'substring(code,1,3)',
    so I tried this:
    SELECT /*+ CURSOR_SHARING_EXACT */
    FROM XMLTable(
    '/HR/EMP'
    passing xmltype( bfilename('DATA_PUMP_DIR','emp.xml'), nls_charset_id('CHAR_CS') )
    columns
    first_name varchar2(30) path 'FNAME',
    last_name varchar2(30) path 'LNAME',
    comments varchar2(4000) path 'substring(COMMENT,1,4000)'
    but that doesn't work either.
    How can I extract the first 4000 characters of the <COMMENT> tag so that the query doesn't fail.
    We are not using any other XMLDB features at this time. This is the first we've started looking into using Oracle built in XML features, so we might not have setup something that other's might know to specifically setup to start using the XML features in Oracle 11.1
    Thanks in advance,
    Wally

    walls99 wrote:
    This is regardless of the COMMENTS tag being 4000 characters or more and the same with the ideas from Odie.
    WallyNo idea if it is an issue with your version. I don't have your version to test but following works for me. Does this simple test work?
    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 Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> set define off
    SQL> select dbms_xmlgen.convert(xmlserialize(content xmltype('<brand>Ben &amp; Jerry</brand>') as clob), 1) from dual ;
    DBMS_XMLGEN.CONVERT(XMLSERIALIZE(CONTENTXMLTYPE('<BRAND>BEN&AMP;JERRY</BRAND>')A
    <brand>Ben & Jerry</brand>

  • Removing non-English characters from data.

    Ours is global system with some data with non-English characters. We want to download file by removing this non-English characters.
    Any suggestions how we can remove these non-English characters from file..?

    The FM u said
         Replace non-standard characters with standard characters
       Functionality
         SCP_REPLACE_STRANGE_CHARS processes a text so that it only contains
         simple characters. Special characters and national characters are
         replaced in such a way that the text remains reasonably legible.
         The character set 1146 is used by default. In this case the following
         replacements are made, for example:
          Æ ==> AE        (AE)
          Â ==> A         (Acircumflex)
          Ä ==> Ae        (Adieresis)
          £ ==> L         (sterling)
         Note that the new text can be longer than the old.
    So i dont think it ll be useful for eliminating the sp. chars.
    U have to check each and every alphabet with std 26 alphabets
    Thanks & Regards
    vinsee

  • Regexpr from java not working in SQL

    Hello I have a complicated regexpr coming from java but when I try to use it with oracle RGEXPR_SUBSTR, it's seems to be buggy as I'm not having all the result (only partial)
    Here is my regexpr for oracle and below the Java version
    Oracle version:
    ^([A-Z0-9]{3})(\d{4,6})([A-Z]{2})(\d{2})\-(\d{2})([A-Z]{2})(?:\-(GA|CA|DEC|INFR|INF|CAC|DECC)?(\d{1,3})?)?(?:\-(\d{2})?((?:C|A|R|FIN|PC|APC|APCFIN|DEF|VO)+[0-9]*)?)?(?:\-(AV|CP|D|LP|NI|OJ|PF|PV|RA|RAS))?(?:\-(\d{1,}))?(?:\-([^\s]{1,}))?\-(OR|ORAN|RELU|TR|TRAN)(\.\w*)?$Java version
    ^([A-Z0-9]{3})(\\d{4,6})([A-Z]{2})(\\d{2})\\-(\\d{2})([A-Z]{2})(?:\\-(GA|CA|DEC|INFR|INF|CAC|DECC)?(\\d{1,3})?)?(?:\\-(\\d{2})?((?:C|A|R|FIN|PC|APC|APCFIN|DEF|VO)+[0-9]*)?)?(?:\\-(AV|CP|D|LP|NI|OJ|PF|PV|RA|RAS))?(?:\\-(\\d{1,}))?(?:\\-([^\\s]{1,}))?\\-(OR|ORAN|RELU|TR|TRAN)(\\.\\w*)?$I simply changed double backslashing \\ to simple backslashing \
    Is my conversion wrong ?
    Here are some test values
    Value                                                          JAVA          ORACLE
    FG1000054EL01-06PP-OR.pdf                                 OK          OK
    SGL005738FR01-09PP-DEC127-09-OR.doc                            OK          NOK
    FED004721EN08-09PP-DEC115-09APCFINC1-RA-Word2007_docx_renamed_back-OR.doc  OK          NOK
    FG1000054EL01-06PP-RELU.pdf                                 OK          NOK
    toto                                                      NOK          NOKThanks for help
    Edited by: Liandra Flaris on Oct 14, 2009 3:35 PM

    Hi,
    Sorry, I can't understand your message.
    Whenever you post code or formatted text on this sit, type
    &#123;code&#125;
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing, and to keep brackets (which are common in regular expressions) from being treated as markup.
    Format and coimmnet your code. For example:
    SELECT  REGEXP_REPLACE ( '&txt'
                     , '(^|[^t[:blank:]|[:space:]])'     ||     -- \1 = Begining or some character other than t or space
                           '([[:blank:][:space:]]*)'     ||     -- \2 =     optional space
                      '(create)'               ||     -- \3 = 'create'
                    '[[:blank:][:space:]]+'     ||     --      at least 1 space
                    '(materialized)'               -- \4 = 'materialized'
                     , '\1\2\3 OR REPLACE /*ADDED*/ \4'
                     , 1
                     , 0
                     , 'i'
    FROM    dual;Not everyone is familiar with regular expressions in Java. Can you explain what you code is supposed to do?
    Why did you double the \ characters?
    Use &#123;code&#125; tags around the output, too, so that people can tell what's in each column.
    Are the results in the Java column correct?

Maybe you are looking for

  • Unable to do F-30 (Post with Clearing) with Payment Advices. Error "F5A144"

    Hi, While I am trying to do F-30 using Payment Advices, it is giving an error message "F5A144 - The residual items amount execeed the original invoice amount and a cash discount amount is active n the item". NOTE: For the invoices that it is trying t

  • Vendor code and Contract no determination in CJ20N

    hi guys, we have this problem , whenever user entries material no 20024970, plant FN66 via CJ20N, system will automatically propose contract no 56001127 and vendor code 300164 .. i have checked ME13 and there is no data exists for mat 20024970 and pl

  • Can you block a call

    Does anyone know if you can block a caller from calling your Iphone 4S?

  • Spotlight and Finder search

    Hi, What is the difference between the Spotlight search and the Finder Search ? anybody? Or its spotlight in the finder? yours sincerely jagjit

  • Time machine won't back up to windows shared drive

    ...I've been through all the possible solutions for this I can find on the web, but Time Machine just produces the 'error 45 message' when trying to back up to windows shared drive. Has anyone had this prob/found a way around this? Thanks