Database swapping accent for "?"

Asked

Viewed 1,783 times

1

In my PL/SQL all accents are being replaced by "?".

Example of a table comment:

Flag device indicator to be???? used in embracing term or not. Possible???? values: 1 - Yes or 0 - No. Default: 1

When I create a direct table in it the accent works, but when I copy a script from a block of text for example and paste in PL/SQL and create the tables is like this.

How to fix this?

  • The problem is the bank’s meeting... I can’t remember for sure which ones are available on the oracle... When I worked with him I had the bank and the table field... Try to change to UTF-8

  • Possible duplicate of Insert with accents in Oracle

  • It is not duplicate, since the mentioned post problem has not been solved and the person uses Sql Developer, I am using PLSQL.

  • See if this answer helps you: Helping

  • What encoding(Ex:UTF-8) and database language (Ex: Innodb) are you using ?

  • Erick Light, some command to see this ?

  • See settings like this: SELECT * FROM NLS_DATABASE_PARAMETERS;

  • NLS_NCHAR_CHARACTERSET : AL16UTF16 NLS_CHARACTERSET : WE8MSWIN1252 NLS_LANGUAGE : AMERICAN

  • 1

    Your script has to be UTF-8 conditioned. You can change it using Notepad++ for example. Go to "format", then select the option "Convert to UTF-8 (without GOOD)". Save the change and test again to see if it worked! :)

Show 4 more comments

1 answer

1

As I suggested in the comments, you can use this query to see your Oracle BD settings:

SELECT * FROM NLS_DATABASE_PARAMETERS;

Your bank is with the settings:

NLS_CHARACTERSET : WE8MSWIN1252
NLS_LANGUAGE : AMERICAN

Probably just changing the NLS_CHARACTERSET of WE8MSWIN1252 for WE8ISO8859P1 the problem will already be solved.

I found the following command to alter it:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET WE8ISO8859P1;
SHUTDOWN IMMEDIATE;
STARTUP;

But caring for, make this change can corrupt data from your BD.

Here are some links for consultation:

https://docs.oracle.com/cd/B28359_01/server.111/b28298/ch11charsetmig.htm#NLSPG011

http://www.dba-oracle.com/t_nls_characterset.htm

https://stackoverflow.com/questions/23779159/change-nls-character-set-parameters-on-oracle-11g-xe

  • 1

    Dear George I could be wrong, but I believe that the iso-8859-1 is not almost equivalent to windows-1252? I believe his problem is with UTF-8. I believe that when the author spoke of PL/SQL he referred to the "PL/SQL editor", then I think it is better to charge before clarification of the author before.

  • 1

    @Guilhermenascimento iso-8859-1 and win-1252 are practically the same. What essentially changes is that in 1252 the band is used 0x80 to 0x9F, reserved in the ISO

  • @Guilhermenascimento is right about the PL/SQL editor, for a long time I did not access this question and answered without paying attention to the detail. He informs that by creating the "direct" table he achieves by accent. I still think that the answer may be useful to those who fall here for the title, do you think better remove? If yes, no problem, just let me know here.

  • Dear George, it is not a question to remove, the question is probably a problem of Unicode, windows-1252 or iso-8859-1 are not Unicode, the problem of the author is something else, I think you should edit the answer and answer exactly what is required for the question, thus saving the question the answer. You can expect feedback from the author of the question, it is likely that the author will come to clarify for you the problem, but covers it, and all, who ask questions like this, lacking information [...]

  • [...] Allies perhaps it is always best to vote to close and wait for the person to edit the question clarifying so that it is possible to "save it". Until another time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.