How to convert char Spanish AL32UTF8 to ISO-8859-1 with sqlplus in linux?

I have the server 11g with NLS_CHARACTERSET with AL32UTF8.  I need to have a varchar2 column, which contains the Spanish character, converted to ISO-8859-1 the output of sqlplus.

So, I put in the bash shell script

'export NLS_LANG = AMERICAN_AMERICA. UTF8'

or

'export NLS_LANG = AMERICAN_AMERICA. AL32UTF8'

And then, I don't

iconv-f UTF-8--t TRANSLIT ISO_8859-1 / / infile.txt > outfile.txt

Two NLS_LANG settings have the problem.

For the two parameters of lang, if I

file - bi infile.txt

It gives text/plain; CharacterSet = utf-8

However

iconv translated

Who Gomez in Gomez who.

Why the e and o and others not translated correctly?

How I translated the Spanish character correctly from the output of sqlplus?

Thank you.

The problem is that your data is stored in the form of decomposed Unicode, which is legal but rarely used for Western European languages.  'e' is stored as 'e' (0 x 65 = U + 0065) more combining acute accent (0xcc, 0 x 81 = U + 0301).  Most of simple conversion, including the conversion of standard Oracle client/server tools, do not take into account this and does not convert the characters broke into a character previously composed of ISO 8859-1. They are trying to convert each of the two codes regardless, 'e' performance as well as a replacement for the character of emphasis, that does not exist in ISO 8859-1. You see the result correctly in SQL Developer, because there is no conversion involved and the rendering of SQL Developer code is able to combine the two codes into a single character, as expected.

As the 'e' and 'o' made up forms in Unicode and ISO 8859-1, the work around is to add the COMPOSITION function in your query. Thus, set NLS_LANG as I've mentioned previously and add new MESSAGE around the expressions of columns to your query.

SELECT COMPOUND (title) OF...

Thank you

Sergiusz

Tags: Database

Similar Questions

  • How to convert a column for lines when characters available with delimiters?

    My requirement is to fill a characters that exist between certain special characters.

    But if all available NULL, which must also be taken in the same order as being available in the chain.

    The sub query returns the values in the following order, but it should display as shown in the result.

    Now, it reads as follows:

    ================

    SUB_STR N

    1 98

    2 78

    68 3

    4 34

    5 90

    6

    Expected results:

    ===========

    SUB_STR N

    1 98

    2 78
    3

    4 68

    5 34

    6 90

    I used the below query, through which I am not able to achieve.

    WITH sample_data AS

    CHOOSE '98, 78, 68, 34, 90' AS str

       FROM dual

    SELECT    LEVEL   AS N

    ,    REGEXP_SUBSTR ( str )

       , '[^,]+'

       , 1

       , LEVEL

       )   AS sub_str

    DE sample_data

    CONNECT BY   LEVEL-1   <= regexp_count(str,',')

    with qry (STR) as)

    Select ' 98, 78, 68, 34, 90' of the double

    )

    Select the level,

    RTrim (regexp_substr (str, ' [^,] *(.| $) ', 1, level), ',') ASPLIT

    of qry

    connect by level<= length="" (regexp_replace="" (str,="" '[^,]+'))="" +="">

    LEVEL ASPLIT
    1 '98'
    2 "78".
    3 null
    4 "68".
    5 "34".
    6 "90."
  • How do to the size of the log buffer reduce with huge Pages Linux

    Data sheet:

    Database: Oracle Standard Edition 11.2.0.4

    OS: Oracle Linux 6.5

    Processor: AMD Opteron

    Sockets: 2

    Carrots / power outlet: 16

    MEM: 252 GB

    Current SGA: GB 122 automatic shared memory (EAMA) management

    Special configuration: Linux huge Pages for 190 GB of memory with the page size of 2 MB.

    Special configuration II: The use of the LUKS encryption to all drives.

    Question:

    1. How can I reduce the size of the log buffer? Currently, it appears that 208 MB. I tried to use log_buffer, and it does not change a thing. I checked the granule size is 256 MB with the current size of the SGA.

    Reason to reduce:

    With the largest size of log buffer the file parallel write newspaper and the synchronization log file is averaged over 45 ms most of the time because she has dumped a lot of stuff at the same time.

    Post edited by: CsharpBsharp

    You have 32 processors and 252 GB of memory, so 168 private discussions, so 45 MB as the public threads size is not excessive.  My example came from a machine running Oracle 32-bit (as indicated by the size of 64 KB of threads private relative to the size of 128 KB of your son) private with (I think) 4 GB of RAM and 2 CPUs - so a much smaller scale.

    Your instance was almost inactive in the meantime so I'd probably look outside the Oracle - but verification of the OS Stats may be informative (is something outside the Oracle using a lot of CPU) and I would like to ask you a few questions about encrypted filesystems (LUKS).  It is always possible that there is an accounting error - I remember a version of Oracle who report sometimes in milliseconds while claiming to centisecondes - so I'll try to find a way to validate the log file parallel write time.

    Check the forum for any stats activity all over again (there are many in your version)

    Check the histogram to wait for additional log file writes event (and journal of file synchronization - the lack of EPA top 5 looks odd given the appearance of the LFPW and and the number of transactions and redo generated.)

    Check the log file to track writer for reports of slow writes

    Try to create a controlled test that might show whether or not write reported time is to trust (if you can safely repeat the same operation with extended follow-up enabled for the author of newspaper which would be a very good test of 30 minutes).

    My first impression (which would of course be carefully check) is that the numbers should not be approved.

    Concerning

    Jonathan Lewis

  • converting char to int

    Hello

    How to convert char to int?

    Thanks in advance

    Just like that

    char c = 'A ';

    int c = c (int);

    Thank you!

  • How to put in Spanish, ESN CP1252, oracle character set WE8MSWIN1252

    Select * from NLS_DATABASE_PARAMETERS

    database character set is
    NLS_CHARACTERSET               AL32UTF8
    NLS_NCHAR_CHARACTERSET         AL16UTF16  
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    Select * from NLS_INSTANCE_PARAMETERS;
    PARAMETER                         VALUE
    --------------------------------- ---------------------------------
    NLS_LANGUAGE                      SPANISH
    NLS_TERRITORY                     SPAIN
    How to put in Spanish, ESN CP1252, oracle character set WE8MSWIN1252

    Please suggest.

    Thank you in advance

    Is it really OK to convert AL32UTF8 WE8MSWIN1252?
    AL32UTF8 NLS_CHARACTERSET

    TO

    WE8MSWIN1252 NLS_CHARACTERSET

    Please suggest

  • How to convert times from second to hh with CVI

    How to convert times from second to hh with CVI?

    Can anyone advice?

    It's here. As I told you, it's very simple:

    //----------------------------------------------------------------------
    // Function secToHMSstring ()
    //----------------------------------------------------------------------
    /// HIFN secToHMSstring ()
    /// HIFN The function takes an amount of seconds and returns a string with
    /// HIFN the corresponding value in H:M:S format
    /// HIPAR sec/Value in seconds to convert
    /// HIPAR verbose/If True use "hms" separators; if not, use ":" separator
    /// HIPAR string/The output string. It is responsibility of the programmer
    /// HIPAR string/that the string is large enough to keep the resulting text
    /// OUT string
    void secToHMSstring (int sec, int verbose, char *string)
    
    {
        int     hh = 0, mm = 0, ss = 0;
    
        if (sec >= 3600) {
            hh = sec / 3600;
            sec -= hh * 3600;
        }
        if (sec >= 60)
            mm = sec / 60;
        ss = sec - mm * 60;
    
        strcpy (string, "");
        if (verbose) {
            if (hh > 0) sprintf (string, "%s%dh", string, hh);
            if (mm > 0) { if (strlen (string)) strcat (string, " "); sprintf (string, "%s%dm", string, mm); }
            if (ss > 0) { if (strlen (string)) strcat (string, " "); sprintf (string, "%s%ds", string, ss); }
        }
        else {
            if (hh > 0) sprintf (string, "%s%d:", string, hh);
            if (mm > 0) {
                if (strlen (string)) sprintf (string, "%s%02d:", string, mm); else sprintf (string, "%d:", mm);
            }
            else if (strlen (string))
                strcat (string, "00:");
            if (strlen (string)) sprintf (string, "%s%02d",  string, ss); else sprintf (string, "%d", ss);
        }
    
        return;
    }
    
  • [Oracle 8i] How to convert a string (timestamp) in a date?

    I find it difficult to know how to convert a string to a date time stamp (or possibly several).

    The timestamp is 20 positions, character (NOT NULL, CHAR (20))
    in the format: YYYYMMDDHHMMSSUUUUUU
    where Y = year, M = month, D = day, M = Minutes, S = seconds and U = microseconds

    The reason why I want to convert it is so that I can compare a timestamp to each other (that is, I want to be able to find the MIN (timestamp), MAX (timestamp) and make comparisons of inequality).

    Is this possible?

    Thanks in advance for the help on this!

    Hello

    As Damorgan said, if all you want to do is find which is the earlier or later, then you can just compare the strings: they are in a format where it works.

    If you need to do other things, such as compare to today date or see the difference between two of your lines of days, you will need to convert it to date. (He has no reason to convert them to numbers).

    A new TIMESTAMP data type, which manages the fractions of a second, was introduced in Oracle 9.
    Since you use Oracle 8 (depending on your subject line), or it must be
    (1) ignores the microseconds, or
    (2) use a separate column for microseconds.

    Whatever it is, use TO_DATE to convert the first 14 characters in DATE:

    TO_DATE ( SUBSTR (txt, 1, 14)
            , 'YYYYMMDDHH24MISS'
            )
    

    where txt is your column of type CHAR.
    To convert microseconds to a number (between 0 and 999999):

    TO_NUMBER (SUBSTR (txt, 15))
    
  • How to convert pictures from iPhoto?  I need general info and advice.  My library is huge (95 GB).  I am running OSX El Capitan 10.11.6 on iMac.

    How to convert pictures from iPhoto?  I need general info and advice.  I saw the help info but I am very nervous to take on this project, as my library is huge (95GB), organized in several events and albums.  My library is saved (Time Machine SimpleSave HD).  I am running OSX El Capitan 10.11.6 on iMac.

    Have you seen this document?   Updated Photos for OS X - Apple iPhoto support

    https://support.Apple.com/en-GB/HT204655

    Is your iPhoto Library Library on your system drive in the pictures folder? And you have a lot of free space on your system drive? The migration will need additional temporary storage.

    Then drag the iPhoto library icon pictures open to create a new library of Photos of her.

    Your albums appear unchanged in the Photos.  Events will appear as additional albums, because the pictures has no events.  See this link: How Photos handles content and metadata for iPhoto and Aperture - Apple Support

  • How to convert WAV, Alac

    How to convert WAV to ALAC files.

    1. Select Apple Lossless as your chosen import format using edit > Preferences > import settings.
    2. Choose files to convert.
    3. Use file > convert > create the Version Apple Lossless.

    TT2

  • How to convert .pdf to .epub

    Please see me step by step how to convert .pdf to .epub

    Hello PrasanW.

    Thank you for using communities Support from Apple. I see your message that you want to convert PDF files into ePub files.

    Read this article.

    Creating ePub with Pages files

    Have a great day.

  • How to convert mp3 to acc in new itunes file 12.4?

    How to convert mp3 to acc in new itunes file 12.4?

    Annoydc,

    Read: Re: suddenly I can't right click to create Mp3s in iTunes.

  • How to convert audio files (many voices) to the text?

    Hello community

    How to convert file .aif audio to text?

    It contains several voice

    Thank you

    With a transcription like this service:

    https://www.tech-synergy.com/OtherServices.php

  • How to convert pdf to word

    I was sent an application form which is in pdf format. I clicked on the "edit and response" button that is displayed, but it is said that it is not supported. How to convert the pdf file to a word document so that I can add information to the document?

    There are a number of free PDF converters on the Mac App store, which allows you to convert text files, but I'm not aware of any free programs convert to Word. Besides knowing what looks like an application and how PDF conversion programs work well, I doubt that the results would be good, even if you've spent the money to buy one.

    However, if the file is not protected by, using the forecasting of Apple program, you should be able to fill out the form. Open the file using the preview, select the Tools menu and select annotate. Select the text option. A text box appears with the word TEXT in there you can change it, change the size and color and then move it to the desired location. Once you have done all of the annotations that you fill out the form, you can save it.

  • How to convert Blu Ray Disc of the movie in general video and HD video formats

    How to convert Blu Ray Disc of the movie in general video and HD video formats

    Hello

    I doubt that this is possible because Bluray discs are mostly protected against copying.
    But if you have the Bluray m2ts file on your HARD drive, then you could try the tool called convertXtodvd. But I don't see that the reasons for this
    I mean that you will lose the quality of film converting the blueray to dvd.

  • How to convert an apple store gift card to buy apps for the iphone?

    How to convert an apple store gift card to buy apps for the iphone?

    Try to buy a gift card iTunes Store with her. Apart from that, you can't.

    (140402)

Maybe you are looking for

  • Apple products - original battery?

    Nice day. I am a master of PC repair. I would like to know if smb. know how and where I can order batteries of origin for Apple products? exactly 5 s to iPhone and iPad 4. Thank you.

  • Live streaming video is not displayed

    When I connect on this site, everything displays correctly except that where the camera feed is supposed to be there is only a white square.

  • purpose of stunnel and mailer

    Good guy, I've beaten this horse to death. Frustration took over. Three things: Stunnel Mailer object Gmail How to make this work? I tried the NUMOROUS of code combinations and nothing works. The button "Test my SMTP settings" really isn't any help.

  • VBAI IMAQdx to acquire initialization sometimes falls down and the ruins of my throat

    I have a GigE (FLIR A325) camera from here acquire images in VBAI.  I have several saved inspections and I use the selection of Inspection step to automatically switch between them based on a shared Variable.  I notice that there is an initialization

  • MCaffee gives me a headache...

    Hello, can someone tell me why Windows xp won't let the DOWNLOAD MaCaffee anti-virus and instlall so I have security for my computer? Do I need to install Windows 7? I hope not! I paid too much for the antivirus... stupid me... bought the MaCaffee To