Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle character encoding

I have an MVIEW on the DEV server as

CREATE MATERIALIZED VIEW MY_MVIEW
AS
SELECT  col1 AS "N° INVOICE" from TABLE

The MVIEW has been installed on PROD server and when i check for its query i have the characther ° not recognized

SELECT query from user_mviews where mview_name = 'MY_MVIEW' ;

QUERY
---------------------------------------
SELECT  col1 AS "N? INVOICE" from TABLE

we use Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production for both environments .

Any idea why this happened and how to correct it? or I need to rename my alias?

like image 292
mcha Avatar asked Dec 17 '25 16:12

mcha


1 Answers

Whenever you see a question mark instead of a special character it means that the client's character set does not support that character and a conversion was not available.

The conversion happens with the database character set as the source and the client character set as the target. The environment variable NLS_LANG lets you control the client character set. NLS_LANG must be set before the connection is opened and it cannot be changed during the session.

For more information about NLS_LANG refer to the Oracle® Database Globalization Support Guide

BTW, NLS_LANGUAGE has nothing to do with the character set! It only controls language used in server messages and locale settings.

like image 142
HAL 9000 Avatar answered Dec 20 '25 10:12

HAL 9000



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!