PDA

Click to See Complete Forum and Search --> : ActiveX not able to translate Special Characters


mrabhishekm
Dec 23rd, 2008, 07:51 AM
hi,

I'm new to this. I have a issue with ActiveX [and I hope I'll be able to put it across well technically].

The issue is like this.

In the DB the unit of measure is written in French [which uses a special character, not present on an English keyboard "é"]

Now the first time the screen opens up correctly [since we are translating the text using custom code] but AS SOON AS THE USER CLICKS ON THE GRID TO OPEN IT UP FOR EDITING THE CHARACTER "é" IS REPLACED BY AN UNDERSCORE "_" .

Can this be an issue with the way ActiveX trying to translate "é" internally and failing to do so? [MSDN says Visual Basic Locale setting is always English US..some clue here?]

more importantly any way to resolve this without removing the special character from the DB?

Please help.

Thanks

techgnome
Dec 23rd, 2008, 08:19 AM
It probably has more to do with the grid than anything else. First thing I'd look at is the font family that is being used by the grid. Also is there an entry mask or something on that field in the grid? Something else you may want to look at is if the grid can support unicode or something that would allow the character.

However, since you indicated that it displayed OK at first, and only changed when you went to edit, I'd look at the mask for the col. Also, if you don't change anything, what happens to the unit of measure when you exit edit mode?

-tg

mrabhishekm
Dec 23rd, 2008, 08:35 AM
thanks for the reply-
answers to your questions -

- Yes! there is an entry mask which is taken from the DB [unitès]

-how do I check if the grid supports this particular character or not?

- the UOM remains as it is if I just click on the grid ->DONT edit anything_> and click ok.

-if I edit it the "è" changes to underscore "_".

techgnome
Dec 23rd, 2008, 08:48 AM
>>>- Yes! there is an entry mask which is taken from the DB [unitès]
Is it an underscore by chance?

>>>-how do I check if the grid supports this particular character or not?
Look to see what font being used, then check to see if that character is in that font family (view the Fonts folder in Windows) ... BUT I don't think this is the problem, as it displays OK.

>>>- the UOM remains as it is if I just click on the grid ->DONT edit anything_> and click ok.
Again, I don't think it's the font, I think it's the entry mask. Look to see if maybe when entering edit mode, if that column getrs cleared out or something.

>>>-if I edit it the "è" changes to underscore "_".
Again, I think there's something going on behind the scenes in the grid, and it maybe either clearing out the value, or it doesn't know how to handle it so it's being set to blank or something.

-tg

mrabhishekm
Dec 23rd, 2008, 09:36 AM
thanks again-
my reply-

I am not sure if I understood what you meant by "mask" correctly.

Well the setting is something like this -the mask [in my words] is something that can be configurable by the user [eg units/packs/bundles]

the code gets an XML which is having qty as well as this mask and internally it separates qty from the mask for custom validations/processing.

I don't think the mask changes in between [and one more point this is happening for all the special characters that are not on my english keyboard]

While debugging this is what i observe-

-when i put the code in debug mode and click the grid for edit and enter some number it hits the function _changeEdit [i suppose it's a customizable VB function]. once the function finishes, i don't know where the control goes [no where in the custom code for sure].the VB env flickers and the control comes bakc to the same _changeEdit function. but by this time the special character had been converted into and underscore.

mrabhishekm
Dec 24th, 2008, 12:11 AM
I dont know which part of code should be posted here [ i really don't :(]

however I may tell you what it does.

We have some data in DB which has to be fetched first and shown on an ActiveX screen.

it's something like
Qty
25 <units> [here the units is configurable] -that means a french user can configure it as <unitès>

so the screen shows the qty as 25unitès on the upper grid.

It DOES display fine when the user opens the screen for inquiry at first.

The user is allowed to change the qty [editable grid]
he clicks on this grid-column -> the qty is shown properly
BUT as soon as he tries to edit it [press some number key say he wants to change the qty to 1 he
presses 1] , the screen shows something like 1unit_s [ the special char is replaced by "_"].

I checked the Font used and surprisingly it doesn't include any special character
[but the screen DOES show the char "è" for the first time. No idea how it's working here]

code wise When the user tries to edit the grid the control hits
_ChangeEdit [not too much there] at the end of this function the VB env flickers for a moment
[i reckon some internal code exection ] and comes back to the _ChangeEdit function.

By this time the "è" has already been changed to "_"

Do I need to be provide something else too?