Re: [Barry-devel] bsmstool for SMS parsing

2009-04-21 Thread Ryan Li
Hi Chris, It seems that wcsnlen() only works for wchar_t types and in Unix-like systems, wchar_t is usually stored in UTF-32 format. Therefore by default, it works and only works with 32-bit UTF-32 strings. And I'm pretty sure it can't be configured to deal with fixed-length 16-bit chars. Conc

Re: [Barry-devel] bsmstool for SMS parsing

2009-04-21 Thread Chris Frey
Hi Ryan, That's true that strnlen() won't work with multi byte chars, which is why I mentioned wcsnlen(). I haven't looked too deeply into that function though, and I don't know if it needs to have an environment setup before it will work correctly. i.e. does it work with 16bit chars and 32 bit

[Barry-devel] libbarry.so.0 error?

2009-04-21 Thread pat minix
I have worked my way thru both the tarball and git repositories to an install under Ubuntu 8.10 (on a typical PC) and am running into an error that I can't see referenced on any of the barry forums. btool: error while loading shared libraries: libbarry.so.0: cannot open shared object file: No

Re: [Barry-devel] bsmstool for SMS parsing

2009-04-21 Thread Nicolas
All functions str* doesn't work well with multi-bytes strings (such as UTF-8) Regards, Nicolas Le mardi 21 avril 2009 à 17:29 +0800, Ryan Li a écrit : > Hi Chris, > > I gave a look at the strnlen() function, and found that it wouldn't work > as I hoped. Since a simple test of strlen("\x40\x00\

Re: [Barry-devel] bsmstool for SMS parsing

2009-04-21 Thread Ryan Li
Hi Chris, I gave a look at the strnlen() function, and found that it wouldn't work as I hoped. Since a simple test of strlen("\x40\x00\x40", 4) will give the return value 1. This simply doesn't work for the strings that have NULL characters *in the middle*. However, as I can see from the raw SM