Sign in to follow this  
Followers 0
Andreik

Unicode problem

9 posts in this topic

I want to create a file that contains all the unicode characters least that's square (remain only remaining characters).

I use this but I don't know what is square or what isn't square.

$FILE = FileOpen(@ScriptDir & "\UNICODE.TXT",32+2)
For $INDEX = 1 To 65535
    FileWriteLine($FILE,$INDEX & @TAB & ChrW($INDEX))
Next
FileClose($FILE)

When the words fail... music speaks

Share this post


Link to post
Share on other sites

What do you mean by square? Do you perhaps mean the block character that represents unrepresentable character values? The values depend on both the font and the loading program's format.

Share this post


Link to post
Share on other sites

What do you mean by square? Do you perhaps mean the block character that represents unrepresentable character values? The values depend on both the font and the loading program's format.

Yes, I want to write to file only representable characters.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Well, technically all the characters are representable. You have to be more specific. If you have a lot of free time, you can just print them all out and see which ones are "blocks".

Share this post


Link to post
Share on other sites

I want to create a file that contains all the unicode characters least that's square (remain only remaining characters).

I use this but I don't know what is square or what isn't square.

$FILE = FileOpen(@ScriptDir & "\UNICODE.TXT",32+2)
For $INDEX = 1 To 65535
    FileWriteLine($FILE,$INDEX & @TAB & ChrW($INDEX))
Next
FileClose($FILE)
IMHO, you could just get a Unicode font.

Take Arial Unicode MS for example.

Nothing will be square.


[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]

Share this post


Link to post
Share on other sites

IMHO, you could just get a Unicode font.

Take Arial Unicode MS for example.

Nothing will be square.

Still exists unrepresentable characters:

$GUI = GUICreate("UNICODE",200,200,-1,-1)
$EDIT = GUICtrlCreateInput("",5,5,190,100)
$NEXT = GUICtrlCreateButton("NEXT",5,120,190,70)
GUICtrlSetFont($EDIT,10,600,8,"Arial Unicode MS")
GUISetState()
$CHR = 1

While 1
    $MSG = GUIGetMsg()
    If $MSG = -3 Then 
        Exit
    ElseIf $MSG = $NEXT Then
        GUICtrlSetData($EDIT,ChrW($CHR))
        $CHR += 1
    EndIf
    Sleep(25)
WEnd

When the words fail... music speaks

Share this post


Link to post
Share on other sites

This is interesting.

Just like an idea:

GUICreate("Test", 500, 500)

Dim $oShell = ObjCreate("Shell.Explorer.2")

GUICtrlCreateObj($oShell, 10, 10, 480, 480)

$oShell.navigate("about:blank")
While $oShell.busy
    Sleep(100)
WEnd

For $i = 1 To 2000;  65535
    $oShell.document.writeln('&#' & $i)
Next

$FILE = FileOpen(@ScriptDir & "\UNICODE.TXT",32+2)
FileWrite($FILE, $oShell.document.body.innerText)

GUISetState()

While GUIGetMsg() <> -3
WEnd

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

This is interesting.

Just like an idea:

GUICreate("Test", 500, 500)

Dim $oShell = ObjCreate("Shell.Explorer.2")

GUICtrlCreateObj($oShell, 10, 10, 480, 480)

$oShell.navigate("about:blank")
While $oShell.busy
    Sleep(100)
WEnd

For $i = 1 To 2000;  65535
    $oShell.document.writeln('&#' & $i)
Next

$FILE = FileOpen(@ScriptDir & "\UNICODE.TXT",32+2)
FileWrite($FILE, $oShell.document.body.innerText)

GUISetState()

While GUIGetMsg() <> -3
WEnd
One question: on your computer does not appear any one character that is represented by a square?

When the words fail... music speaks

Share this post


Link to post
Share on other sites

One question: on your computer does not appear any one character that is represented by a square?

Well, control characters are represented as a square (except 9, 10, 11, 12, 13) and 127, 129, 141, 143, 144, 157, 735, 746...

I did change a line in that script $oShell.document.writeln('&#' & $i) --> $oShell.document.writeln($i & '&nbsp;&#' & $i) to see dec values


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0