Statistiques
| Révision :

root / tmp / org.txm.setups / nsis / Examples / unicode.nsi @ 3144

Historique | Voir | Annoter | Télécharger (1,04 ko)

1
; Unicode is not enabled by default
2
; Unicode installers will not be able to run on Windows 9x!
3
Unicode true
4

    
5
Name "Unicode Games"
6
OutFile "unicode.exe"
7
RequestExecutionLevel User
8
ShowInstDetails show
9
XPStyle on
10

    
11

    
12
Section "Unicode in UI"
13

    
14
	DetailPrint "Hello World!"
15
	DetailPrint "שלום עולם!"
16
	DetailPrint "مرحبا العالم!"
17
	DetailPrint "こんにちは、世界!"
18
	DetailPrint "你好世界!"
19
	DetailPrint "привет мир!"
20
	DetailPrint "안녕하세요!"
21

    
22
	DetailPrint "${U+00A9}" # arbitrary unicode chars
23

    
24
SectionEnd
25

    
26

    
27
Section "Unicode in Files"
28

    
29
	Var /Global Message
30

    
31
	InitPluginsDir
32
	FileOpen $0 "$PluginsDir\Test.txt" w
33
	IfErrors done
34
	FileWriteUTF16LE /BOM $0 "Hello World "
35
	FileWriteWord $0 0xD83C # Manually write ${U+1F30D}
36
	FileWriteWord $0 0xDF0D # as surrogate-pair
37
	FileWriteUTF16LE $0 " and Sun ${U+2600}$\r$\n"
38
	FileClose $0
39

    
40
	FileOpen $0 "$PluginsDir\Test.txt" r
41
	IfErrors done
42
	FileReadUTF16LE $0 $Message
43
	FileClose $0
44

    
45
	DetailPrint "Message: $Message"
46
	done:
47

    
48
SectionEnd