Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tool] Text Hex Convert

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #1    
Old July 4th, 2014 (10:21 AM). Edited 3 Weeks Ago by Kakarot1212.
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
UPDATE PEOPLE!

Text Hex DecoderConvert Version 2.1.1



What the heck is this tool?



This "poorly-made" tool converts Text values to Hex value, and vice-versa. And it is now written in VB.NET! After I decided to part ways with Java. For example if you want to change the game's battle messages,(see smeargles' tutorial HERE) you can use this tool to aid you in converting text values to hex values, and again, vice-versa. And now added support to standard hex!

If you're familiar with hex, converting is just a piece of cake for you. But what if not? Try to look at this:

Let's try to convert the string, "Hello world" for example. Now, how the heck can we convert this to hex? Take note that every letter has it's corresponding Hex equivalent. You can look at this list if you want:
Spoiler:

Pokemon MSG Hex Values
Spoiler:

00= (space)
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Œ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=œ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[pk]
54=[mn]
55=[po]
56=[ké]
57=[bl]
58=[oc]
59=[k]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[U]
7A=[D]
7B=[L]
7C=[R]
85=<
86=>
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[.]
B1=[""]
B2=""
B3=[']
B4='
B5=[m]
B6=[f]
B7=[$]
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]


Standard Hex Values
Spoiler:

20=(space)
61=a
62=b
63=c
64=d
65=e
66=f
67=g
68=h
69=i
6a=j
6b=k
6c=l
6d=m
6e=n
6f=o
70=p
71=q
72=r
73=s
74=t
75=u
76=v
77=w
78=x
79=y
7a=z
41=A
42=B
43=C
44=D
45=E
46=F
47=G
48=H
49=I
4a=J
4b=K
4c=L
4d=M
4e=N
4f=O
50=P
51=Q
52=R
53=S
54=T
55=U
56=V
57=W
58=X
59=Y
5a=Z
7e=~
60=`
21=!
40=@
23=#
24=$
25=%
5e=^
26=&
2a=*
28=(
29=)
2d=-
5f=_
2b=+
2c=,
2e=.
2f=/
3a=:
3b=;
3c=<
3e=>
3f=?
5b=[
5c=\
5d=]
7b={
7c=|
7d=}


Now, did you find yourself a pretty hard time looking for its hex equivalent?
Worry not anymore cause this is the aim of this tool. To help minimize the work for you.
Just input the text/hex you want to convert, push the convert button, and VIOLA! piece of cake, ain't it?

Screenshots



Spoiler:

You can ignore the first though xD
Old Screens
Spoiler:





New Screens
Spoiler:

Standard Hex support

Some improvement on tools section

Some improvements on the help section

Other forms function

History function




Bugs


This tool cannot convert specific characters yet, for "Text - Hex" only. They are as
follows:
  • [pk], [mn], [po], [k], [ké], [bl], [oc], [U], [D]
    [L], [R], [.], [""], "", ['], [m], [f], [$], [x], [>]
    [u], [d], [l]

Future Plans

  • Add a "Hex to Text" feature DONE!
  • Improve GUI DONE!
  • Ability to directly open a ROM and change its battle messages
    directly
  • Fix all bugs - Getting there
  • And a lot more, I hope.


Changelog


Spoiler:
Version 1:
  • Major release
Version 1.1:
  • Fixed major and minor bugs
  • Added changelog
Version 2.0:
  • Added Hex to Text Feature
  • GUI Improved
  • Now written in VB.NET
  • Open source!
  • And lots more
Version 2.1.0:
  • Name changed from 'Text Hex Decoder' to 'Text Hex Convert'
  • Added support for Standard Hex Values
  • Added 'History' function
  • Addded 'Other Form' functions that shows the other possible forms of the hex
  • Added update function
  • And further GUI improvement

Version 2.1.1:
  • No longer requires opening the ini file. Just make sure the ini files are in the ini folder.
  • Some tweaks in the program


Download


Spoiler:
Version 1 [JAVA] (old, has bug)
Version 1.1 [JAVA]
Version 2.1.1 (latest release)


Source Code


Link is in the tool, in the about section.


If you want to test the older versions, you would want to download Java 6 or higher since the v1 and v1.1 are both written in Java.


Enjoy!

-Kakarot1212
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #2    
Old July 15th, 2014 (05:05 PM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
deez nuts!!!1!!!1!!!1!!
Gold Tier
 
Join Date: Jun 2013
Location: Miami, FL
Age: 15
Gender: Male
Nature: Hasty
Posts: 928
Why has no one commented on this yet? This is great, this can be really helpful for decapitalization, instead of having to use Advance-Text and then compare roms in a hex editor. Good job!
__________________
Pokémon Fluorite Version (Beta 2 Released)


Beta 1 is out! Click on the image to get it!

Hey guys, I'm really sorry to advertise here, but my friend's band just released a really good song, and I think I'd mean a lot to them if I shared it, so..

https://soundcloud.com/the-keys-to-lincoln-road/thinking-of-you-nana
Reply With Quote
  #3    
Old July 15th, 2014 (05:19 PM).
machomuu's Avatar
machomuu machomuu is online now
We'll practice like it's 1999!
Moderator
 
Join Date: Apr 2008
Location: Americalanavania
Gender: Male
Nature: Relaxed
Posts: 7,317
Agreed, this is pretty awesome. This is a great tool to ween people off of A-Text and change things that would otherwise be left untouched due to lack of hex editing knowledge. I'm interested to see how this will develop.
__________________
Reply With Quote
  #4    
Old July 15th, 2014 (08:56 PM).
Tlachtli's Avatar
Tlachtli Tlachtli is offline
Crit happens.
 
Join Date: Jan 2012
Location: Faraway place
Age: 24
Gender: Male
Nature: Modest
Posts: 256
I'll definitely be giving this a try, writing in hex directly is a PITA
__________________
Pokemon Sigma Σmerald:

A Gen 3 remake de-make, (soon to be) featuring many Gen VI mechanics
Reply With Quote
  #5    
Old July 22nd, 2014 (11:32 AM).
Queen Azura's Avatar
Queen Azura Queen Azura is offline
Mistress of Midnight
 
Join Date: Jul 2014
Location: North Carolina
Gender: Female
Nature: Sassy
Posts: 59
I've been using this to decapitalise my hack, and being new to hex, this is just a godsend! Thank you so much for making it ♥
__________________


. : | cast off the fleeting, transient world | : .
. : | FC: 5086-3361-9631 IGN: Azura | : .
Reply With Quote
  #6    
Old July 26th, 2014 (12:07 PM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
WOW! Thanks for all the awesome comments guys! I will try to develop this tool to make it more powerful. :D
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #7    
Old July 26th, 2014 (07:46 PM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
deez nuts!!!1!!!1!!!1!!
Gold Tier
 
Join Date: Jun 2013
Location: Miami, FL
Age: 15
Gender: Male
Nature: Hasty
Posts: 928
Sometimes the tool doesn't work, like right now, I put STORAGE and it gave me CD CE C9 CC BB C1 BF and that's fine, but now I put Storage and it gives me CD E8 E6 D5 DB D9. It happens commonly so please fix :D
__________________
Pokémon Fluorite Version (Beta 2 Released)


Beta 1 is out! Click on the image to get it!

Hey guys, I'm really sorry to advertise here, but my friend's band just released a really good song, and I think I'd mean a lot to them if I shared it, so..

https://soundcloud.com/the-keys-to-lincoln-road/thinking-of-you-nana
Reply With Quote
  #8    
Old July 27th, 2014 (05:21 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by Dark Sneasel:
Sometimes the tool doesn't work, like right now, I put STORAGE and it gave me CD CE C9 CC BB C1 BF and that's fine, but now I put Storage and it gives me CD E8 E6 D5 DB D9. It happens commonly so please fix :D
That's just normal. Because the hex equivalent of BIG letter and small letters are different. Like BIG letter 'O' is C9 and small letter 'o' is E6 .
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #9    
Old July 27th, 2014 (05:40 AM). Edited July 27th, 2014 by Aruaruu.
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 187
Damn. Sure wish I came across this tool earlier. Would have saved me a tonne of time.
EDIT: Seems to not insert the line breaks (FE in hex.)
Reply With Quote
  #10    
Old July 27th, 2014 (07:18 AM). Edited July 27th, 2014 by Danny0317.
Danny0317's Avatar
Danny0317 Danny0317 is offline
deez nuts!!!1!!!1!!!1!!
Gold Tier
 
Join Date: Jun 2013
Location: Miami, FL
Age: 15
Gender: Male
Nature: Hasty
Posts: 928
Quote originally posted by Kakarot1212:
That's just normal. Because the hex equivalent of BIG letter and small letters are different. Like BIG letter 'O' is C9 and small letter 'o' is E6 .
I know about that, it's the number of Hex characters that are appearing xD
__________________
Pokémon Fluorite Version (Beta 2 Released)


Beta 1 is out! Click on the image to get it!

Hey guys, I'm really sorry to advertise here, but my friend's band just released a really good song, and I think I'd mean a lot to them if I shared it, so..

https://soundcloud.com/the-keys-to-lincoln-road/thinking-of-you-nana
Reply With Quote
  #11    
Old July 28th, 2014 (03:14 AM). Edited July 28th, 2014 by Kakarot1212.
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by Dark Sneasel:
I know about that, it's the number of Hex characters that are appearing xD
Ooohhh, you should have said earlier sorry about that. I'll go and fix this. Thanks for reporting
EDIT: In addition to that, what other particular word(s) does this same error occur at?

Quote originally posted by Aruaruu:
Damn. Sure wish I came across this tool earlier. Would have saved me a tonne of time.
EDIT: Seems to not insert the line breaks (FE in hex.)
Yeah, it currently don't work at the moment. Please insert it manually for the meantime. I'll add this when school ♥♥♥♥s are done.
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #12    
Old July 28th, 2014 (08:23 AM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
deez nuts!!!1!!!1!!!1!!
Gold Tier
 
Join Date: Jun 2013
Location: Miami, FL
Age: 15
Gender: Male
Nature: Hasty
Posts: 928
Quote originally posted by Kakarot1212:
Ooohhh, you should have said earlier sorry about that. I'll go and fix this. Thanks for reporting
EDIT: In addition to that, what other particular word(s) does this same error occur at?
Not sure. Sometimes it just happens randomly, I don't think it depends on the words. Good luck in fixing this, it really has helped a lot
__________________
Pokémon Fluorite Version (Beta 2 Released)


Beta 1 is out! Click on the image to get it!

Hey guys, I'm really sorry to advertise here, but my friend's band just released a really good song, and I think I'd mean a lot to them if I shared it, so..

https://soundcloud.com/the-keys-to-lincoln-road/thinking-of-you-nana
Reply With Quote
  #13    
Old July 28th, 2014 (07:30 PM).
KDS's Avatar
KDS KDS is offline
 
Join Date: Jul 2013
Age: 20
Gender: Male
Posts: 190
It was not able to translate the small 'o' in Dark Sneasal's case. When I type 'o' it gives a blank output. This is the problem. There might be more characters missed. Otherwise, the tool is very convenient
Reply With Quote
  #14    
Old July 29th, 2014 (01:29 AM). Edited July 30th, 2014 by Kakarot1212.
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by Dark Sneasel:
Not sure. Sometimes it just happens randomly, I don't think it depends on the words. Good luck in fixing this, it really has helped a lot
Quote originally posted by KDS:
It was not able to translate the small 'o' in Dark Sneasal's case. When I type 'o' it gives a blank output. This is the problem. There might be more characters missed. Otherwise, the tool is very convenient
Yeah, sorry about that guys. It was a heck a lot of carelessness of me that I miscoded the small 'o' to big 'O'. BTW it is fixed now. Thanks for reporting
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #15    
Old July 30th, 2014 (09:19 PM).
Smeargle's Avatar
Smeargle Smeargle is offline
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Posts: 160
Send a message via Skype™ to Smeargle
Very Nice tool,
I did have a private tool similar to this, but I never got the hex to text feature working properly. I look forward to seeing that implemented .
Reply With Quote
  #16    
Old July 31st, 2014 (01:18 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by Smeargle:
Very Nice tool,
I did have a private tool similar to this, but I never got the hex to text feature working properly. I look forward to seeing that implemented .
Yeah, it really gives me aches at the moment, but I'll work on it when exams are done. :D
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #17    
Old July 31st, 2014 (07:57 AM).
Iced.Tea Iced.Tea is offline
 
Join Date: Jul 2014
Gender: Male
Posts: 1
Quote originally posted by Kakarot1212:
Yeah, it really gives me aches at the moment, but I'll work on it when exams are done. :D
I hope you will get good grades!!!
Reply With Quote
  #18    
Old January 6th, 2015 (02:57 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
UPDATE!
See first post
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #19    
Old January 6th, 2015 (03:32 AM).
Percy's Avatar
Percy Percy is offline
Blaziken ftw
 
Join Date: Sep 2014
Location: Somewhere in the world, obviously
Gender: Male
Nature: Gentle
Posts: 2,071
I can't open it, it says
Spoiler:
! Text Hex Decoder v2.0.zip: The archive is either in unknown format or damaged
__________________
Pokémon Ranger Academy
I'm on reduced activity 'cause of some issues with our WiFi, and I'm a little busy working with my mom.
Pair

Reply With Quote
  #20    
Old January 6th, 2015 (03:42 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by BlazikenXY:
I can't open it, it says
Spoiler:
! Text Hex Decoder v2.0.zip: The archive is either in unknown format or damaged
Link fixed! Please try to download it again.
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #21    
Old January 12th, 2015 (06:11 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
UPDATE!

Some highlights on the Version 2.1.0

Version 2.1.0:
  • Name changed from 'Text Hex Decoder' to 'Text Hex Convert'
  • Added support for Standard Hex Values
  • Added 'History' function
  • Added 'Other Form' functions that shows the other possible forms of the hex
  • Added update function
  • And further GUI improvement
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #22    
Old January 12th, 2015 (06:16 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by Smeargle:
Very Nice tool,
I did have a private tool similar to this, but I never got the hex to text feature working properly. I look forward to seeing that implemented .
I managed do it somehow
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
  #23    
Old January 14th, 2015 (07:11 AM).
ThomasWinwood's Avatar
ThomasWinwood ThomasWinwood is offline
 
Join Date: Nov 2013
Gender: Male
Nature: Relaxed
Posts: 40
I'm skeptical as to the need for a dedicated GUI for this, frankly.

Code:
[thomas@chansey ~/Documents/Projects/pkmn-macro]♣ python
Python 3.4.2 (default, Jan 12 2015, 11:38:40) 
[GCC 4.9.2 20141224 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs, pokemon
>>> codecs.register(pokemon.getregentry)
>>> "Hello, Pokécommunity!".encode("pokemon")
b'\xc2\xd9\xe0\xe0\xe3\xb8\x00\xca\xe3\xdf\x1b\xd7\xe3\xe1\xe1\xe9\xe2\xdd\xe8\xed\xab'
Here. It's in the public domain. It's not the best mapping in the world, but it's not my fault - the encoding Gamefreak used doesn't map cleanly onto Unicode. For example, Unicode has separate codepoints for apostrophe (U+0027) and closing single quote (U+2019), but Gamefreak use 0xB4 as both. I didn't want my codec to be non-bijective, so I don't encode U+0027 as 0xB4, which leads to behaviour that may look odd.

Code:
>>> "RIVAL's NAME?".encode("pokemon") # U+0027 APOSTROPHE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thomas/Documents/Projects/pkmn-macro/pokemon.py", line 8, in encode
    return codecs.charmap_encode(input, errors, encoding_dict)
UnicodeEncodeError: 'charmap' codec can't encode character '\x27' in position 5: character maps to <undefined>
>>> "RIVAL’s NAME?".encode("pokemon") # U+2019 RIGHT SINGLE QUOTATION MARK
b'\xcc\xc3\xd0\xbb\xc6\xb4\xe7\x00\xc8\xbb\xc7\xbf\xac'
>>> import unicodedata
>>> unicodedata.name("'")
'APOSTROPHE'
>>> unicodedata.name("’")
'RIGHT SINGLE QUOTATION MARK'
I also haven't added support for 0x53 through 0x59, because I'm not sure what the correct thing to do is. Use the private-use area? Decode e.g. 0x53 as U+1D3E U+1D0B?

The encoding of 0xFC through 0xFF is arbitrary and frankly not very good.
Reply With Quote
  #24    
Old January 14th, 2015 (11:21 AM).
PokéMew's Avatar
PokéMew PokéMew is online now
Put On The Red Light!
Silver Tier
 
Join Date: Sep 2013
Location: The Refresh Button
Age: 16
Gender: Other
Nature: Naughty
Posts: 336
You're a true lifesaver for making this tool, saved me lots of time and frustration! Thank you!
__________________
-- Pokémon Fuchsia Version --
Coming This Year!
Reply With Quote
  #25    
Old January 16th, 2015 (02:35 AM).
Kakarot1212's Avatar
Kakarot1212 Kakarot1212 is offline
Awesome as always...
 
Join Date: Oct 2013
Location: Phillipines
Age: 17
Gender: Male
Nature: Naughty
Posts: 506
Quote originally posted by PokéMew151:
You're a true lifesaver for making this tool, saved me lots of time and frustration! Thank you!
I'm glad I can help :p

Quote originally posted by ThomasWinwood:
I'm skeptical as to the need for a dedicated GUI for this, frankly.

Code:
[thomas@chansey ~/Documents/Projects/pkmn-macro]? python
Python 3.4.2 (default, Jan 12 2015, 11:38:40) 
[GCC 4.9.2 20141224 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs, pokemon
>>> codecs.register(pokemon.getregentry)
>>> "Hello, Pokécommunity!".encode("pokemon")
b'\xc2\xd9\xe0\xe0\xe3\xb8\x00\xca\xe3\xdf\x1b\xd7\xe3\xe1\xe1\xe9\xe2\xdd\xe8\xed\xab'
Here. It's in the public domain. It's not the best mapping in the world, but it's not my fault - the encoding Gamefreak used doesn't map cleanly onto Unicode. For example, Unicode has separate codepoints for apostrophe (U+0027) and closing single quote (U+2019), but Gamefreak use 0xB4 as both. I didn't want my codec to be non-bijective, so I don't encode U+0027 as 0xB4, which leads to behaviour that may look odd.

Code:
>>> "RIVAL's NAME?".encode("pokemon") # U+0027 APOSTROPHE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thomas/Documents/Projects/pkmn-macro/pokemon.py", line 8, in encode
    return codecs.charmap_encode(input, errors, encoding_dict)
UnicodeEncodeError: 'charmap' codec can't encode character '\x27' in position 5: character maps to <undefined>
>>> "RIVAL’s NAME?".encode("pokemon") # U+2019 RIGHT SINGLE QUOTATION MARK
b'\xcc\xc3\xd0\xbb\xc6\xb4\xe7\x00\xc8\xbb\xc7\xbf\xac'
>>> import unicodedata
>>> unicodedata.name("'")
'APOSTROPHE'
>>> unicodedata.name("’")
'RIGHT SINGLE QUOTATION MARK'
I also haven't added support for 0x53 through 0x59, because I'm not sure what the correct thing to do is. Use the private-use area? Decode e.g. 0x53 as U+1D3E U+1D0B?

The encoding of 0xFC through 0xFF is arbitrary and frankly not very good.
Let me be blunt, the GUI is important because it simply makes work easier. Compare to what you made, my tool is easier to use right? You don't need to type lots of codes to make it work, just hit convert and your done! That alone save a lot of time. And it is less confusing compared to what you show. Let's take the example you gave:

Yours: "Hello, Pokécommunity!".encode("pokemon")
b'\xc2\xd9\xe0\xe0\xe3\xb8\x00\xca\xe3\xdf\x1b\xd7\xe3\xe1\xe1\xe9\xe2\xdd\xe8\xed\xab'
-> With this, you still need to remove the apostrophes, backslashes and the 'x' char to be inserted in the ROM, and that alone consumes a LOT of time. What if it is a whole lot of sentence?

Mine: Just type "Hello, Pokécommunity!" on the text field, hit convert and you get C2 D9 E0 E0 E3 B8 00 CA E3 DF 1B D7 E3 E1 E1 E9 E2 DD E8 ED AB, hit copy, paste on the ROM, done. Easy right?

Anyway, I know this can be done on Python this way, but I wanted to make more conventional one. Good luck on yours bro.
__________________

Chimcharz iz better than Mudkeepz
Pair 1 // Pair 2 // Showdown // PHO // Twitter
Text Hex Convert v2.1.1
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 07:03 PM.