Set command to eliminate strange characters

I have a very simple query
set heading off;
SPOOL on;
SELECT GENERAL.GJBPSEQ.NEXTVAL from dual;
COMMIT;
EXIT;
create a file
oneup.dat
I need to read this file in s shl script
sqlplus -s  ${ID}/${PW} ${AT_SIGN}${SCRIPT_PATH}${SCRIPT_NAME} > oneup.dat
read oneup < oneup.dat
It seems that the file is has strange characters, it is suppose a numeric value (from the seq,GJBPSEQ)
I know it is a command set that I can use in the sql query to make sure that I will bring just a numeric value with not strange characters..

I'd turn off more settings if I were you:
set heading off;
set timing off
set echo off
set feedback off
set pagesize 0
SPOOL ./oneup.dat;
SELECT GENERAL.GJBPSEQ.NEXTVAL from dual;
spool off
EXIT;
After running it, my spool file looks simply:
unix > more oneup.dat
         2
so now in unix, you can cram it into a variable easy enough:
unix > read oneup < oneup.dat
unix > echo $oneup
2

Similar Messages

  • Strange characters showing up in Essbase Server pick list

    I have one user, that is logging into her Essbase spreadsheet addin and seeing all kinds of strange characters following each server name in the Server drop down list within the Essbase System Login window.  Any ideas what would cause this?
    What we have found is the Server names and strange characters are showing up in the registry key: "HKEY_CURRENT_USER\Software\Hyperion Solutions\Essbase\Login".  Normally you would see something like this in this key:
    (Default)    Reg_SZ    (Value not set)
    Server        Reg_SZ    ServerName1
    Server1      Reg_SZ    ServerName2
    Server2      Reg_SZ    ServerName3
    etc.
    What is showing now, is the original list of servers, with 10 or so new ones that repeat the server names that were already there followed by strange characters.  There were 10 extra entries in this particular persons drop down list.  We deleted them from the Registry and she was good for a few minutes and then they came back!!  Anybody seen this before?  We are running 11.1.2.1 of the Oracle Essbase Spreadsheet Add-in.  Excel 2010.  Windows 7.  She is also using the In2HypEssbase ribbon, but so are many others, and she is the only one experiencing this problem.
    Thanks,
    Mike

    Sorry, I forgot to mention that we did delete them from the registry and they did disappear from the drop down list.  But a little while later it happened again!  They seem to keep coming back and we don't know why.  Again, she is the only person in the company that has had this issue.  I have had her shutdown everything and reboot her pc with no luck as well, just to make sure there wasn't something quirky going on in the memory of the pc.
    Mike

  • Strange characters in pdf

    Hello,
    i have a strange problem with "strange characters" (such as "à", "ö" etc). I have to edit pdf files produced with Adobe Acrobat by other people. In some cases, when i try to "copy and paste" text from this file into a "note" (within the same file), the strange characters appear scrambled, such as "Ÿ" instead of "ü", or "Ž" instead of "é".
    I noticed the following:
    1) on the screen, the original text looks correct, but after copying and pasting it into the note-tool (within Acrobat), it looks scrambled. If i paste it into another application (TextEdit or Word), it stays scrambled.
    2) this happens not for all files, but only for some of them. note that all files come from the same source...
    3) The same string of text looks and behaves absolutely fine when i open the pdf file with another application such as Preview.
    4) In Acrobat, i can edit the scrambled notes to make out of an "Š" an "é" - but that is a time consuming way of doing things.
    I think it has something to do with Font availability, or Unicode, or so, but a don't find the right thing to do. And i really need a solution, since editing within Acrobat is part of my money-earning work ...
    Who has a useful hint ???
    Thanks in advance,
    thomas

    Guessing here, but possibly the others and you aren't set to the same language? - the font codes for the diacriticals may vary between languages?

  • Strange characters when copy/paste from Word

    Hi,
    I have in Word u2018hellou2019 and when I paste it in the Notes of IR and save it, it turns into  018hello 019 so the apostrophes transform into these strange characters.
    I checked with Notepad, Excel and Wordpad and this issue does not occur, only for Word.
    Do you know why this happens ?
    It should be a Word/IE setting as this issue does not occur on a Terminal Server. Only on usersu2019
    workstations.
    Thank you
    Edited by: Mihai Olaru on Nov 1, 2008 2:43 AM

    Hi Shiva,
    Some styles for font of rich text aren't be kept when I copy the content from Word 2013 and paste into a wiki page from SharePoint 2010/2013(even SharePoint 2007 like this
    post) site as same as yours, it looks like a limitation.
    As a workaround, we can publish the Word content as a Blog article in SharePoint site, then copy the content from the blog page to the needed SharePoint page, it will keep the rich text content format, you can have a try.
    http://plexhosted.com/billing/knowledgebase/274/How-to-publish-a-SharePoint-blog-article-via-Microsoft-Word-2013-SharePoint-2013.html
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Excel shows strange characters over Remote desktop

    Hi,
    Experiencing this weird issue were when I  RDP to my computer , the characters in excel sheet display weird characters
    For instance the letter A looks squished
    When opening the same excel sheet locally, the normal text is displayed.
    Repaired office, looked for updates and nothing seems to fix it.
    All your help will be greatly appreciated.

    First of all.   I did not say we only had the problem with Server 2008 R2.   We DO NOT have any problem at all with Server 2008 R2.   The only problem is when using RDP to run an application on either Server 2003 or Server 2008.  
    That means the original version, the 32-bit version of Server 2008.
    We have just tried various clients.  The clients tried include XP, Win 7 and Win 8.1.   On Win 8.1 the RDP version is 6.3.9600.   On XP the RDP version is 6.0.6001.   I am not sure which RDP was being used on Win 7.
    All of these clients had the same problem that I am posting about.   Strange characters.   They almost look like an incorrect character set.
    The very same application that is giving us problems via RDP was tried by running directly via the LAN and WAN.  When this app is run in this manner everything looks fine and there are no strange character issues.  Just in case anyone wants to
    suggest that we run this app in that manner, forget it!   The reason we run using terminal services is because the performance is way too slow of the WAN link if we try to run direct.  I also want to point out that this app has been running,
    using terminal services for  several years now and there has not been an issue.
    As for screen shots, I'm working on that.

  • Google search displays strange characters before search, firefox 3.6.7, ubuntu 10.04

    I get these strange characters when I go to Google search using Firefox 3.6.7 and Ubuntu 10.04.......see below
    ᎢᏳᏍᏗ ᎨᏒ ᎣᏲᎲᎢᎠᏑᏰᏍᏗ ᏳᏍᏗ ᎠᏁᎵᏔᏅ (These characters are on the Google search page before I search and below search bar.
    strange characters below:
    ᎾᏍᎩᏯᎢ Directory ᏚᎾᏓᏡᎬ
    What is going on....It reads OK using Chromium. I can't read anything. I am using Firefox 3.6.7. My View....character encoding is set to :
    Western(ISO-8859-1) and auto detect "on"
    == ?

    Just to update this topic if anyone else has the issue. I've fixed it by manually amending the following setting in about:config -
    Preference name: intl.accept_languages
    Value: en-gb, en
    If you're in the US you'd use ''en-us, en'' instead.
    I then re-ran Firefox Sync and now on the Windows machines this value shows up as User Defined instead of default and this is now kept when syncing (I'm assuming the default values are not included when syncing preferences, for obvious reasons).

  • Strange characters in azalea barcode

    I have azalea barcode I2of5 in a crystal report 2008 sp2 report that show strange characters such as paragraph symbols in barcode image.
    See the image:
    [[http://i39.tinypic.com/eqpjbp.jpg]]
    The OS is win7 64bits
    What's wrong is going on?

    Hello,
    This is a known issue with Microsoft's GDIPlus dll, We can't fix it. Try updating your Video drivers and/or change your DPI settings, may help.
    CR - ADAPT01538982
    Only other option is to try a different True Type Barcode font, don't use the Convert to Barcode in the UI, just simply set the fields font to the TT barcode font.
    Don

  • Waiting the best solution to strange characters for non-latin songs?

    I've tried to find a solution to the "Strange Characters" when importing songs with non-latin characters (I'm fan of greek music)... I`ve changed the ID3 tags to 2.4 and nothing happened...should I wait for the upgrade?

    On re-reading and following your directions, I really should have given you 10 pts. for that answer, Tom, and not 5.  I'd somehow misunderstood the glyph view, thinking it was only a matrix of a certain standard, limited set of symbols, like arrow dingbats and such. I see the way it works now, and it's quite practical.
    Thanks very much.
    Rob

  • Using online ExportPDF to DocX - DocX File Full of Strange Characters

    I have a PDF in English, origninating in China, and when the conversion is complete the DocX file is populated by strange characters (would seem to me to be a fonts issue, but I do not know). Only the pictures in the document are recognizeable in any way against the original PDF.

    Replying to my own post after some debug time on this. The problem arrises when the conversion process is launched directly from the Adobe PDF software in Windows, rather than a conversion launched from the ExportPDF website. I re-ran the conversion from the website and got the desired result. There is some default setting in the Adobe Reader X software (V10.1.1 on Win7 Home Premium 64, SP1) which controls OCR and ConvertTo language and causes the failed convert.

  • Report previews and prints with strange characters

    I have a custom XI application which uses CCrystalReportViewer11 (C++ wrapper around ActiveX control) to preview reports. This works for hundreds of installations, but for one the text is displayed and printed with strange characters. If the customer exports the report the characters are displayed as normal. What could be wrong?

    More than likely, it's a printer driver issue. It may even be that there is no default printer driver installed. Also, see if setting a different default printer driver helps. You can also set the "No Printer" option in the report by opening it in the designer and going to the File menu and selecting "Page Setup".
    Ludek

  • Strange Characters apears in my form (SAPSCRIPT)...

    Hello,
    I am printing one list using SAPSCRIPT by symbols:
    SET COUNTRY 'PT'
    &t003t-LTEXT(20)&
    The problem is when i saw the results. In "t003t-ltext" there are text´s with signs ´ ^ ~, from portuguese character. When i print the list it apears strange characters...
    Any help...
    Regards,

    Hello,
    I have found one solution <TF>&teste&</>. TF is a kind of letter.

  • JMenu text and strange characters

    Hello,
    Using jdk1.4.1, Win2K pro, and setting the L&F to windows causes strange characters to appear in my JMenu text. Using either:
    JMenu new = new JMenu("Create/Modify a file");
    or
    new.setText("Create/Modify a file")will cause this "Create/Modify. a file"
    So I end up with periods or comas all through my file menus.
    Anyone else expierenced this with 1.4.1?
    Didn't happen in 1.3.1
    Thanks
    Jim

    There are different solution already posted in the forum. This is one of them:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=303795

  • When i print a pdf from preview it prints strange characters - it looks fine on screen

    when i print a pdf from preview it prints strange characters - it looks fine on screen

    You can also try opening the PDF with preview, then doing a copy and paste to TextEdit and printing from there.
    Adobe makes it easier, but you do have software to accomplish this.
    Only download Adobe reader from this site, to avoid "fakes/spoofs/malware" that will cause damage to your machine.
    http://www.adobe.com/support/downloads/product.jsp?platform=macintosh&product=10
    Hope this helps

  • Pages document turned to gibberish-strange characters in rectangles. Can't read underlying text (still there)

    I use a Pages document (password protected) as a frequent reference. It is 22 pages of text. Suddenly most text was replaced with strange characters, each encased in a little rectangle, so document was unreadable. Selecting a section of text, I could right-click and see that underlying text was still there, just not readable onscreen. Style was "Normal*." I don't know what the " * " means. I selected all and changed style to "Heading 9" on the list. All text reappeared, so my data is ok - for now (though not formatted as I want it). I can't trust Pages, however, and don't know what caused the problem or how to avoid it.
    Note that the style now shows "Heading 9*". I don't know why the " * ". I tried selecting all and making "Normal" the global style, but the strange characters wouldn't budge. Switching back to Normal brings back gibberish.
    Some text is Verdana; I just noticed that changing font also got rid of gibberish. Changing back to Verdana brought back gibberish.
    Note that not every line of text was changed to gibberish; some were just fine.
    Other Pages documents are fine - right now. I notice that there are asterisks in Style in other text documents.
    I'm an experienced computer user, new to Pages in the fall when it came with my MacBook Air. In this document, format isn't all that important, but I can imagine where this would be a huge disaster for other types of documents.
    Any help in figuring out what's going on most appreciated.

    Tom -
    "That sounds like Apple's Last Resort font, which gets used when for some reason the app forgets about the font being used.  Use Fontbook to make sure you don't have duplicate Verdanas on your machine.  Also try cleaning your font caches with Onyx or by doing a safe boot"
    Wow! Who would have guessed! Thank you for the advice; Fontbook revealed a number of duplicate fonts - ot Verdana, interestingly enough -  which I have now resolved. I then switched all text to Trebuchet MS, and everything reverted to normal. I can live with Trebuchet.
    This problem appeared on the same day (before or after I wasn't sure) I installed MS Office. Could this have caused the problem?
    Thanks for your prompt reply, explanation and solutions.

  • Strange characters instead of PDF-file

    when I forward to a servlet called Test.java, my browser return a PDF file.
    but when I write the method of the servlet in a bean, called WinkelWagen.java, and I write the rest of the code of the servlet in a jsp file (pdf.jsp, this jsp calls the method in the bean) I only get strange characters returned by my browser and Acrobat Reader doesn't run.
    the code of the servlet Test.java:
    package be.steppe.cursusdienst.pdf;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.io.ByteArrayOutputStream;
    import java.io.PrintWriter;
    import be.steppe.cursusdienst.instellingen.Variabelen;
    import be.steppe.cursusdienst.beans.WinkelWagen;
    import be.steppe.cursusdienst.Product;
    import com.lowagie.text.*;
    import com.lowagie.text.pdf.*;
    public class Test extends HttpServlet
         public Test()
              super();
         public void doGet(HttpServletRequest req, HttpServletResponse resp)
              throws javax.servlet.ServletException, java.io.IOException
              DocumentException ex = null;
              ByteArrayOutputStream baosPDF = null;
              //HttpSession session = req.getSession(true);
              //WinkelWagen ww = (WinkelWagen) req.getAttribute("winkelWagen");
              //Vector vector = new Vector();
              //vector = ww.genereerFormLijst();
              try
                   baosPDF = fix();
                   StringBuffer sbFilename = new StringBuffer();
                   sbFilename.append("filename_");
                   sbFilename.append(System.currentTimeMillis());
                   sbFilename.append(".pdf");
                   resp.setHeader("Cache-Control", "max-age=30");
                   resp.setContentType("application/pdf");
                   StringBuffer sbContentDispValue = new StringBuffer();
                   sbContentDispValue.append("inline");
                   sbContentDispValue.append("; filename=");
                   sbContentDispValue.append(sbFilename);
                   resp.setHeader("Content-disposition",sbContentDispValue.toString());
                   resp.setContentLength(baosPDF.size());
                   ServletOutputStream sos;
                   sos = resp.getOutputStream();
                   baosPDF.writeTo(sos);
                   sos.flush();
              catch (DocumentException dex)
                   resp.setContentType("text/html");
                   PrintWriter writer = resp.getWriter();
                   writer.println(
                             this.getClass().getName()
                             + " caught an exception: "
                             + dex.getClass().getName()
                             + "<br>");
                   writer.println("<pre>");
                   dex.printStackTrace(writer);
                   writer.println("</pre>");
              finally
                   if (baosPDF != null)
                        baosPDF.reset();
         protected ByteArrayOutputStream fix() throws DocumentException {
              Document doc = new Document();
              ByteArrayOutputStream baosPDF = new ByteArrayOutputStream();
              PdfWriter docWriter = null;
              try
                   docWriter = PdfWriter.getInstance(doc, baosPDF);
                   doc.addAuthor(this.getClass().getName());
                   doc.addCreationDate();
                   doc.addProducer();
                   doc.addCreator(Variabelen.getPdfAuteur());
                   doc.addTitle("BESTELLING");
                   doc.setPageSize(PageSize.LETTER);
                   HeaderFooter footer = new HeaderFooter(
                                       new Phrase("BESTELLING     ID:           GEPLAATST DOOR:"),
                                       false);
                   doc.setFooter(footer);
                   doc.open();
    /*                for(int i = 0 ; i < vector.size() ; i++) {
    *                doc.add(new Paragraph( ((Product) vector.elementAt(i)).getProductId() ));
                   doc.add(new Paragraph(
                                  "This document was created on "
                                  + new java.util.Date()));
              catch (DocumentException dex)
                   baosPDF.reset();
                   throw dex;
              finally
                   if (doc != null)
                        doc.close();
                   if (docWriter != null)
                        docWriter.close();
              if (baosPDF.size() < 1)
                   throw new DocumentException(
                        "document has "
                        + baosPDF.size()
                        + " bytes");          
              return baosPDF;
    }The code of the bean:
    package be.steppe.cursusdienst.beans;
    import java.util.Vector;
    import be.steppe.cursusdienst.Product;
    import be.steppe.cursusdienst.FormProduct;
    import java.io.*;
    import be.steppe.cursusdienst.instellingen.Variabelen;
    import com.lowagie.text.*;
    import com.lowagie.text.pdf.*;
    public class WinkelWagen implements Serializable {
      private Vector producten;
      public WinkelWagen() {
        producten = new Vector();
      public void voegProductToe(Product p) {
        producten.addElement(p);
      public Vector haalProducten() {
        return producten;
      public void verwijderProduct(int pId) {
        for(int i = 0 ; i < producten.size() ; i++) {
          if(pId == ((Product) (producten.elementAt(i))).getProductId()) {
            producten.removeElementAt(i);
            break;
      public void maakWinkelWagenLeeg() {
        producten.removeAllElements();
      public Vector genereerFormLijst() {
        int aantal = 0;
        Vector lijst = new Vector();
        boolean alInLijst;
        for(int i = 0 ; i < producten.size() ; i++) {
          aantal = 0;
          int prodId;
          alInLijst = false;
          Product p = (Product) producten.elementAt(i);
          prodId = p.getProductId();
          for(int l = 0 ; l < lijst.size() ; l++) {
            if(prodId == ((FormProduct) (lijst.elementAt(l))).getProductId()) {
              alInLijst = true;
          if(!alInLijst) {
            for(int q = 0 ; q < producten.size() ; q++) {
              if(prodId == ((Product) (producten.elementAt(q))).getProductId()) {
                aantal++;
            int pId = ((Product) (producten.elementAt(i))).getProductId();
            String tNaam = ((Product) (producten.elementAt(i))).getTypeNaam();
            String tit = ((Product) (producten.elementAt(i))).getTitel();
            String omschr = ((Product) (producten.elementAt(i))).getOmschrijving();
            double pr = ((Product) (producten.elementAt(i))).getPrijs();
            int hoev = ((Product) (producten.elementAt(i))).getStock();
            FormProduct formProduct = new FormProduct(pId,tNaam,tit,omschr,pr,hoev,aantal);
            lijst.addElement(formProduct);
          return lijst;
        public double berekenTotaal() {
          double totaal = 0;
          for(int i = 0 ; i < producten.size() ; i++) {
            Product p = (Product) producten.elementAt(i);
            totaal = totaal + p.getPrijs();
          return totaal;
        public ByteArrayOutputStream fix() throws DocumentException {
             Vector vector = genereerFormLijst();
             Document doc = new Document();
              ByteArrayOutputStream baosPDF = new ByteArrayOutputStream();
              PdfWriter docWriter = null;
              try
                   docWriter = PdfWriter.getInstance(doc, baosPDF);
                   doc.addAuthor("author");
                   doc.addCreationDate();
                   doc.addProducer();
                   doc.addCreator(Variabelen.getPdfAuteur());
                   doc.addTitle("BESTELLING");
                   doc.setPageSize(PageSize.LETTER);
                   HeaderFooter footer = new HeaderFooter(
                                       new Phrase("BESTELLING     ID:           GEPLAATST DOOR:"),
                                       false);
                   doc.setFooter(footer);
                   doc.open();
                   for(int i = 0 ; i < vector.size() ; i++) {
                   doc.add(new Paragraph( ((FormProduct) vector.elementAt(i)).getProductId() ));
                   doc.add(new Paragraph(
                                  "This document was created on "
                                  + new java.util.Date()));
              catch (DocumentException dex)
                   baosPDF.reset();
                   throw dex;
              finally
                   if (doc != null)
                        doc.close();
                   if (docWriter != null)
                        docWriter.close();
              if (baosPDF.size() < 1)
                   throw new DocumentException(
                        "document has "
                        + baosPDF.size()
                        + " bytes");          
              return baosPDF;
    }the code of the JSP-file
    <html>
    <head>
    </head>
    <%@ page import="java.io.ByteArrayOutputStream" %>
    <%@ page import="java.io.PrintWriter"%>
    <%@ page import="be.steppe.cursusdienst.instellingen.Variabelen"%>
    <%@ page import="be.steppe.cursusdienst.beans.WinkelWagen"%>
    <%@ page import="be.steppe.cursusdienst.Product"%>
    <%@ page import="java.util.*" %>
    <%@ page import="com.lowagie.text.*" %>
    <%@ page import="com.lowagie.text.pdf.*" %>
    <jsp:useBean class="WinkelWagen" id="winkelWagen" scope="session" />
    <body>
    <%
    ByteArrayOutputStream baosPDF = null;     
    try
                   baosPDF = winkelWagen.fix();
                   StringBuffer sbFilename = new StringBuffer();
                   sbFilename.append("filename_");
                   sbFilename.append(System.currentTimeMillis());
                   sbFilename.append(".pdf");
                   response.setHeader("Cache-Control", "max-age=30");
                   response.setContentType("application/pdf");
                   StringBuffer sbContentDispValue = new StringBuffer();
                   sbContentDispValue.append("inline");
                   sbContentDispValue.append("; filename=");
                   sbContentDispValue.append(sbFilename);
                   response.setHeader("Content-disposition",sbContentDispValue.toString());
                   response.setContentLength(baosPDF.size());
                   ServletOutputStream sos;
                   sos = response.getOutputStream();
                   baosPDF.writeTo(sos);
                   sos.flush();
              catch (DocumentException dex)
                   response.setContentType("text/html");
                   PrintWriter writer = response.getWriter();
                   writer.println(
                             this.getClass().getName()
                             + " caught an exception: "
                             + dex.getClass().getName()
                             + "<br>");
                   writer.println("<pre>");
                   dex.printStackTrace(writer);
                   writer.println("</pre>");
              finally
                   if (baosPDF != null)
                        baosPDF.reset();
    %>
    </body>
              </html>can anyone please help me out ...
    gr
    Steppe

    ok,
    I removed the html tags in the jsp-file and now acrobat reader does start.
    but it says the pdf file is damaged and cannot be repaired ...
    any ideas?
    gr
    Steppe

Maybe you are looking for