解決 SQL 不能正確顯示中文問題

2022-05-04 14:21:14 字數 1803 閱讀 7870

use

databasename

goif

notobject_id('

[employees]

') is

null

drop

table

[employees]go

create

table

[employees

](id

intprimary

keyidentity(1,1),

[name

]nvarchar(50) not

null,

[title

]nvarchar(50) null,

[phone

]int

null,

[city

]nvarchar(20))

goinsert

into

[employees

]select'張三

', '

採購經理

', 1234567, '北京'

union

allselect'李四

', '

銷售', 7654321, '上海'

union

allselect'王小

', '

前台', 1230000, '上海'

select

*from

[employees

]where

[city]=

'上海'

view code

結果顯示:

不改變排序規則和字段型別,加 n 解決:

use

databasename

goif

notobject_id('

[employees]

') is

null

drop

table

[employees]go

create

table

[employees

](id

intprimary

keyidentity(1,1),

[name

]nvarchar(50) not

null,

[title

]nvarchar(50) null,

[phone

]int

null,

[city

]nvarchar(20))

goinsert

into

[employees

]select n'

張三', n'

採購經理

', 1234567, n'北京'

union

allselect n'

李四', n'

銷售', 7654321, n'上海'

union

allselect n'

王小', n'

前台', 1230000, n'上海'

select

*from

[employees

]where

[city

]= n'

上海'

view code

結果顯示:

vim不能正確顯示中文

我自己的配置檔案在我工作環境下面 中文字型好像只有兩三種 中文字顯示成為了框框。檢視配置檔案 fileencodings fileencoding termencoding都已經設好 並且,在vim中ggvg然後到notepad中c v,notepad中能夠顯示。搞了一會,發現搞不定,這時候大蝦st...

解決了LWUIT中文不能顯示的問題

使用label和radiobutton時,出現了奇怪的現象 英文可以顯示,中文不能顯示。剛開始以為lwuit對中文做了處理,因為資源中有乙個l10n,簡單看了裡面的結構,有語言和key,有點多國語言的感覺。l10n的結構是 key的數量 語言的數量 key的數量個utf名稱 語言的數量的資料塊,每個...

wkhtmltopdf 中文不能顯示問題完美解決

裝好wkhtmltopdf 中文顯示空白或者亂碼方框 網路上說一般是中文支援沒有安裝 說新增yum源後安裝以下兩個包 fonts chinese.noarch fonts iso8859 2 75dpi.noarch root alpha openl soft rpm ivh fonts chine...