Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I have a application with ANSI C, I want to move it to BREW, but BREW has only support AECHAR.

Q:
Is the smallest data type AECHAR(2 bytes) in BREW? Can BREW use byte array? For example, my name is "Iee", I want to define a byte array to put it in:

char(or int8) name[3];

Is it workable?

[QUOTEI want to define a byte array to put it in:
char(or int8) name[3];
Is it workable?
Yes its possible...U can use char or byte. Its the smallest(1 byte) data type.
Regards
Arun Bangari

[QUOTEI want to define a byte array to put it in:
char(or int8) name[3];
Is it workable?
Yes its possible...U can use char or byte. Its the smallest(1 byte) data type.
Regards
Arun Bangari

AECHAR is used, but you can still use char and unsigned char types. byte is also defined in the brew include files ( typedef unsigned char byte). some of the brew APIs use AECHAR strings instead of char strings, but you can use the helper functions STRTOWSTR() and WSTRTOSTR() to convert back and forth.

AECHAR is used, but you can still use char and unsigned char types. byte is also defined in the brew include files ( typedef unsigned char byte). some of the brew APIs use AECHAR strings instead of char strings, but you can use the helper functions STRTOWSTR() and WSTRTOSTR() to convert back and forth.

......
3.BREW is Unicode (wide string) compliant only (no ISOLATIN1/ANSI) except for file names, which are ISOLATIN1/ANSI. Always use AECHAR instead of "char". Use string services provided in AEEStdLib.h for string manipulation.
......
What is it meaning? BREW is Unicode compliant ONLY except for file name... What does the "ONLY" mean?

......
3.BREW is Unicode (wide string) compliant only (no ISOLATIN1/ANSI) except for file names, which are ISOLATIN1/ANSI. Always use AECHAR instead of "char". Use string services provided in AEEStdLib.h for string manipulation.
......
What is it meaning? BREW is Unicode compliant ONLY except for file name... What does the "ONLY" mean?

only mean that
The filename can not use Unicode.

only mean that
The filename can not use Unicode.

HI,
There are possibilities to use byte array and also u can use the following datatype..... If you want u can have a look at AEEComDef.h...
#ifndef boolean
typedef unsigned char boolean; /* Boolean value type. */
#endif
typedef unsigned long int uint32; /* Unsigned 32 bit value */
typedef unsigned short uint16; /* Unsigned 16 bit value */
typedef unsigned char uint8; /* Unsigned 8 bit value */
typedef signed long int int32; /* Signed 32 bit value */
typedef signed short int16; /* Signed 16 bit value */
typedef signed char int8; /* Signed 8 bit value */
/* This group are the deprecated types. Their use should be
** discontinued and new code should use the types above
*/
typedef unsigned char byte; /* Unsigned 8 bit value type. */
typedef unsigned short word; /* Unsinged 16 bit value type. */
typedef unsigned long dword; /* Unsigned 32 bit value type. */
typedef unsigned char uint1; /* Unsigned 8 bit value type. */
typedef unsigned short uint2; /* Unsigned 16 bit value type. */
typedef unsigned long uint4; /* Unsigned 32 bit value type. */
typedef signed char int1; /* Signed 8 bit value type. */
typedef signed short int2; /* Signed 16 bit value type. */
typedef long int int4; /* Signed 32 bit value type. */
typedef signed long sint31; /* Signed 32 bit value */
typedef signed short sint15; /* Signed 16 bit value */
typedef signed char sint7; /* Signed 8 bit value */
Regards
V. Anand

HI,
There are possibilities to use byte array and also u can use the following datatype..... If you want u can have a look at AEEComDef.h...
#ifndef boolean
typedef unsigned char boolean; /* Boolean value type. */
#endif
typedef unsigned long int uint32; /* Unsigned 32 bit value */
typedef unsigned short uint16; /* Unsigned 16 bit value */
typedef unsigned char uint8; /* Unsigned 8 bit value */
typedef signed long int int32; /* Signed 32 bit value */
typedef signed short int16; /* Signed 16 bit value */
typedef signed char int8; /* Signed 8 bit value */
/* This group are the deprecated types. Their use should be
** discontinued and new code should use the types above
*/
typedef unsigned char byte; /* Unsigned 8 bit value type. */
typedef unsigned short word; /* Unsinged 16 bit value type. */
typedef unsigned long dword; /* Unsigned 32 bit value type. */
typedef unsigned char uint1; /* Unsigned 8 bit value type. */
typedef unsigned short uint2; /* Unsigned 16 bit value type. */
typedef unsigned long uint4; /* Unsigned 32 bit value type. */
typedef signed char int1; /* Signed 8 bit value type. */
typedef signed short int2; /* Signed 16 bit value type. */
typedef long int int4; /* Signed 32 bit value type. */
typedef signed long sint31; /* Signed 32 bit value */
typedef signed short sint15; /* Signed 16 bit value */
typedef signed char sint7; /* Signed 8 bit value */
Regards
V. Anand

i want to create file having name in Unicode
how to do this

i want to create file having name in Unicode
how to do this

I don't think you can do that. File names have to use single-byte characters.
-Erik

I don't think you can do that. File names have to use single-byte characters.
-Erik

hi ,
we can do like this
1.convert UTF16(wide char ) to UTF8(using WSTRTOUT8())
2.YOU CAN PASS THIS CONVERTED STRING AS ARGUMENT TO IFILEMGR API
(dont forget to type cast it to char*)
this is working fine
another thing is you can verify whether file is created properly or not only when
you phone native app. supports rendering of that font.

hi ,
we can do like this
1.convert UTF16(wide char ) to UTF8(using WSTRTOUT8())
2.YOU CAN PASS THIS CONVERTED STRING AS ARGUMENT TO IFILEMGR API
(dont forget to type cast it to char*)
this is working fine
another thing is you can verify whether file is created properly or not only when
you phone native app. supports rendering of that font.

Can anybody give a c program for converting WSTRTOSTR()???

Can anybody give a c program for converting WSTRTOSTR()???