Garry's Mod Wiki


  Panel:SetAllowNonAsciiCharacters( boolean allowed )


Configures a TextEntry to allow user to type characters that are not included in the US-ASCII (7-bit ASCII) character set.

Characters not included in US-ASCII are multi-byte characters in UTF-8. They can be accented characters, non-Latin characters and special characters.


1 boolean allowed
Set to true in order not to restrict input characters.


Replaces the default vgui.Create() function to always allow non US-ASCII characters for text inputs.

if vgui.CreateStdRestrict == nil then vgui.CreateStdRestrict = vgui.Create end function vgui.Create( classname, parent, name ) local vgui_elt = vgui.CreateStdRestrict(classname, parent, name) if classname == "DTextEntry" or classname == "RichText" or classname == "TextEntry" then vgui_elt:SetAllowNonAsciiCharacters(true) end return vgui_elt end