Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:ValidChatMessageCharacters
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapitype}}<br> [[API SendChatMessage|SendChatMessage]] cannot send all characters (or better call it 'bytes')!<br> Of course normal text - you would type in a custom channel - is supported, but some characters you might want to send by an addon can cause an error or - even worse - disconnect the player.<br> <br> These are the characters that appear to be allowed for "msg" in [[API SendChatMessage|SendChatMessage("msg"{,"type"{,"lang"{,"channel"}}})]]. == Allowed Characters == <br> (use [[API strchar|strchar(charID)]] to construct a char out of its decimal representation and [[API strbyte|strbyte("text" [, index])]] to do the reverse thing)<br> <br> {| |----- | width="120" height="17" | '''ID''' | width="320" | '''Printout''' [by ChatFrame1:AddMessage(strchar(ID))] | width="400" | '''Note''' |----- | 0 || ''none'' (terminates string) || complete message ignored (not sent) |----- | 1 - 9 || ? || ok |----- | 10 || ''new line'' (line feed) || DISCONNECT |----- | 11 - 12 || ? || ok |----- | 13 || ''new line'' (carriage return) || ok |----- | 14 - 31 || ? || ok |----- | 32 - 123 || ''standard ASCII'' || ok (don't forget the character sequences '%t' and '%f': they will be replaced by your target's / focus's name or something like "<no target/focus>" - or a localized equivalent) |----- | 124 || <nowiki>|</nowiki> || ERROR "invalid escape code in chat message" (causes DISCONNECTs in patch 3.1.3) |----- | 125 - 126 || ''standard ASCII'' || ok |----- | 127 || ? || ok |----- | 128 - 255 || ? || ERROR "chat message must be UTF-8 text" possible |} == Notes == I tested each character by sending it to a custom channel named "test". Then I converted the received character to its ID and compared it with the original ID.<br> Especially on a byte-per-byte basis [[API SendChatMessage|SendChatMessage]] has its restrictions (beside the 255 character - better say byte - thing).<br> <br> Be very careful with splitting a UTF-8 text! You can end up with unexpected UTF-8 errors.<br> <br> According to UTF-8: the error described above is not a big problem if your addon doesn't split a UTF-8 character into its byte-parts (I had the problem while automatically splitting messages that exceeded the maximum of 255 bytes!)<br> <br> [[API SendAddonMessage|SendAddonMessage]] does not have any of those byte problems (except 0000 0000 and forbidden "\t" in prefix).
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Wowapi
(
edit
)
Template:Wowapitype
(
edit
)