[hlcoders] Re: SendProxy_String_tToString can't send wide-char

2007-11-11 Thread Haza
Try these two functions. Just wrote them then in like 3min, haven't tested them. It allows you to send wchar_t strings. All it really does is substitutes 0x00 for 0xFF. So you loose the use of 0x00FF and 0x characters. I think I forgot to check for wchar_t string ending in the Encode function

[hlcoders] Re: SendProxy_String_tToString can't send wide-char

2007-11-12 Thread Haza
Garry that would mean sending twice as much as he wants to. You could waste a lot of bandwidth :( ~Haza ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

Re: [hlcoders] Re: SendProxy_String_tToString can't send wide-char

2007-11-11 Thread bloodykenny
In my case it is quite possible for 0xFF to occur, so I ended up doing, as I mentioned previously, a sort of base-128 workaround like below. It works, it's just really lame. Oh well, thanks though. my_uint16_t my_htons(my_uint16_t i) { assert(i < 255*255); my_uint16_t encoded_i = 0;

Re: [hlcoders] Re: SendProxy_String_tToString can't send wide-char

2007-11-12 Thread Garry Newman
Could these work? void Q_hextobinary( const char *in, int numchars, unsigned char *out, int maxoutputbytes ); void Q_binarytohex( const unsigned char *in, int inputbytes, char *out, int outsize ); garry On Nov 12, 2007 1:40 AM, <[EMAIL PROTECTED]> wrote: > In my case it is quite possible for 0x