Re: Unable to authenticate in case of multilingual characters
Hello Sir, But the issue is you have written the Chinese charter directly in place of user name rather than writing its equivalent UTF-8 into users file as said by you. users: "現年快樂" Auth-Type := Accept My doubt is How can I write UTF-8 encoded (may be HEX form) in users file. Because I have did the same in place of Chinese I have written the hex equivalent of ∞ infinity symbol which is also a multilingual character in place of username and sent the request containing hex equivalent of UTF-8 of ∞ infinity symbol. Kindly correct me If i am wrong. -Karnik jain On Fri, Feb 4, 2011 at 10:25 PM, James J J Hooper <jjj.hooper@bristol.ac.uk>wrote:
--On 04 February 2011 22:02 +0530 karnik jain <karnik.jain@gmail.com> wrote:
Hi Alan,
I have written multilingual character *∞ *directly in RADIUS server's *users file.* without encoding it into UTF-8. * * Do I need to write Username in *user file of RADIUS server *after converting it into UTF-8 to make the *whole thing work*?
If Yes then How can I write UTF-8 characters into *users file of RADIUS server.*
Do I need to write directly the *HEX of encoded characters* or some other way into the *users file of RADIUS server as shown in attached users file of RADIUS server*? * * I have double check that the UTF-8 Encoder of mine is working fine. Multilingual character = ∞ (infinity symbol) is having equivalent form in HEX = *0xe2889e* and UTF-8 encoding of *0xe2889e* is = *0xf8 0xb8 0xa2 0x9e.*
*Can any one please look into to above issue * *and guide me How can I configure the files of free RADIUS server * *to use USER-NAME field other than **US-ASCII like * *Chinese etc.?* * * *Regards,* *Karnik jain*
Hi Karnik, If you put UTF in the users file and UTF in the User-Name in the radius request it will work. For example:
users: "現年快樂" Auth-Type := Accept
...and then testing it:
echo 'User-Name = "現年快樂"' | radclient -x 137.222.253.91:16010 auth SECRET Sending Access-Request of id 161 to 137.222.253.91 port 16010 User-Name = "現年快樂" rad_recv: Access-Accept packet from host 137.222.253.91 port 16010, id=161, length=20
Regards, James
-- James J J Hooper Network Specialist Information Services University of Bristol http://www.wireless.bristol.ac.uk --
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 02/04/2011 02:01 PM, karnik jain wrote:
Hello Sir,
But the issue is you have written the Chinese charter directly in place of user name rather than writing its equivalent UTF-8 into users file as said by you.
No, it was utf-8, but was rendered as a Chinese glyph.
users: "現年快樂" Auth-Type := Accept
My doubt is How can I write UTF-8 encoded (may be HEX form) in users file.
By using an editor that supports utf-8 You keep asking internationalization questions on this list and people by their graciousness answer you. But as far as I can tell you haven't made any effort to understand how internationalization works. Until you understand it you're going to keep beating your head against a wall, plus it's not our responsibility to teach you this material, it's your job to learn it.
and UTF-8 encoding of *0xe2889e* is = *0xf8 0xb8 0xa2 0x9e.*
Wrong. The utf-8 encoding of infinity is the 3 octet sequence: 0xE2 0x88 0x9E Hint, you can't just type the above into a file!!!! -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
karnik jain wrote:
But the issue is you have written the Chinese charter directly in place of user name rather than writing its equivalent UTF-8 into users file as said by you.
Uh... nonsense. You can't write chinese characters in ASCII. You need to write them in another encoding, such as UTF-8.
users: "現年快樂" Auth-Type := Accept
My doubt is How can I write UTF-8 encoded (may be HEX form) in users file.
You keep saying "hex form". I have no idea what that means, and I suspect, neither do you.
Because I have did the same in place of Chinese I have written the hex equivalent of ∞ infinity symbol which is also a multilingual character in place of username and sent the request containing hex equivalent of UTF-8 of ∞ infinity symbol.
No. You write the UTF-8 characters, and it will work. Your insistence on using some non-existent "hex equivalent" is why it doesn't work. Alan DeKok.
Hello Sir, Uh... nonsense.
You can't write chinese characters in ASCII. You need to write them in another encoding, such as UTF-8.
*SOrry for giving half information Sir,* I even know that I can't write the Chinese characters in ASCII. You have misunderstood me totally sir over here. But the thing is like I just want to know that If I write "現年快樂" just by doing copy paste to users file then will the things gonna work ?
users:
"現年快樂" Auth-Type := Accept
My doubt is How can I write UTF-8 encoded (may be HEX form) in users file.
You keep saying "hex form". I have no idea what that means, and I suspect, neither do you.
As far as the HEX form is concern I mean to say that How that character is internally stored in memory. It has to be in binary form ri8? So You an also interprete as equivalent HEX. *Eg:* *A character *stored in binary as 101001 in memory and HEX equivalent is = 0x29 Same *B* character stored in binary in memory as 101010 and HEX equivalent is = 0x292A. I am asking is I have sored ∞ character in unsigned int array like following in my RADIUS client for sending it to FREE RADIUS server. unsigned int array[0] = '∞'; and I have seen its hex equivalent form by just using printf("HEX form: 0x%x\n",array[0]); I got the print as: *E2 88 9E* * * *That's I am not able to understand that How automatically* *'∞' symbol is stored in memory in its equivalent UTF-8 form: **E2 88 9E* *Who does the conversion, EDITER in linux or Keybord Driver * *itself converts to UTF-8 form?*
Because I have did the same in place of Chinese I have
written the hex equivalent of ∞ infinity symbol which is also a multilingual character in place of username and sent the request containing hex equivalent of UTF-8 of ∞ infinity symbol.
No. You write the UTF-8 characters, and it will work. Your insistence on using some non-existent "hex equivalent" is why it doesn't work.
By Saying write in UTF-8 charcters that means do I need to simply write in users file like following.? *users: * "∞" Auth-Type := Accept
karnik jain wrote:
I am asking is I have sored ∞ character in unsigned int array like following in my RADIUS client
Then this has nothing to do with FreeRADIUS. It's not our role to educate you in internationalization issues, UTF-8, character sets, how RADIUS work, etc. You were told what you had to do in order to make FreeRADIUS handle UTF-8: use a UTF-8 editor when you edit the config files. Alan DeKok.
OK No probs sir, Thank a lot to Alan and John for guiding me a lot. On Sun, Feb 6, 2011 at 10:58 PM, Alan DeKok <aland@deployingradius.com>wrote:
karnik jain wrote:
I am asking is I have sored ∞ character in unsigned int array like following in my RADIUS client
Then this has nothing to do with FreeRADIUS.
It's not our role to educate you in internationalization issues, UTF-8, character sets, how RADIUS work, etc.
You were told what you had to do in order to make FreeRADIUS handle UTF-8: use a UTF-8 editor when you edit the config files.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
John Dennis -
karnik jain