membership turkish character problem in username or password
membership turkish character problem in username or password
Hello,
I have problem to register usernames with turkish characters.
It gives Devart.Data.PostgreSql.PgSqlException of wrong array of bytes for UTF8: 0xf0.
How does membership username and password accept turkish characters?
Used: ASP.NET 4, Devart.Data.PostgreSql, Version=5.10.96.0
I have problem to register usernames with turkish characters.
It gives Devart.Data.PostgreSql.PgSqlException of wrong array of bytes for UTF8: 0xf0.
How does membership username and password accept turkish characters?
Used: ASP.NET 4, Devart.Data.PostgreSql, Version=5.10.96.0
HTML ASCII codes and explanations of turkish characters
This is the list of HTML ASCII codes and explanations of turkish characters:
Ç Latin Capital Letter C Cedilla
ç Latin Small Letter C Cedilla
Ü Latin Capital Letter U Umlaut
ü Latin Small Letter U Umlaut
Ö Latin Capital Letter O Umlaut
ö Latin Small Letter O Umlaut
İ Latin Capital Letter I Dotted
ı Latin Small Letter i Dotless
Ğ Latin Capital Letter G Breve
ğ Latin Small Letter g Breve
Ş Latin Capital Letter S Cedilla
ş Latin Small Letter s Cedilla
Encoding is used in the project: utf-8
Other encodings used for turkish: windows-1254, ISO-8859-9[/url]
Ç Latin Capital Letter C Cedilla
ç Latin Small Letter C Cedilla
Ü Latin Capital Letter U Umlaut
ü Latin Small Letter U Umlaut
Ö Latin Capital Letter O Umlaut
ö Latin Small Letter O Umlaut
İ Latin Capital Letter I Dotted
ı Latin Small Letter i Dotless
Ğ Latin Capital Letter G Breve
ğ Latin Small Letter g Breve
Ş Latin Capital Letter S Cedilla
ş Latin Small Letter s Cedilla
Encoding is used in the project: utf-8
Other encodings used for turkish: windows-1254, ISO-8859-9[/url]
web.config definition
web.config file has following membership definition:
<add name="AspNetPgSqlMembershipProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlMembershipProvider" description="dotConnect for PostreSQL membership provider" ...
<add name="AspNetPgSqlMembershipProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlMembershipProvider" description="dotConnect for PostreSQL membership provider" ...
membership commands in codebehind also do not work.
Membership.CreateUser(userName, password)
command in codebehind also does not work.
Devart.Data.PostgreSql.PgSqlException
command in codebehind also does not work.
Devart.Data.PostgreSql.PgSqlException
encoding doe not solve local character membership problem.
Membership.CreateUser(Encoding.UTF8.GetString(Encoding.Default.GetBytes(userName)), password)
Trying encoding did not solved the problem. This time Membership created the user, but ? was written to database instead of turkish characters in username.
I could not create usernames consisting local characters in DevArt Membership. Does DevArt Membership not accept local characters?
Trying encoding did not solved the problem. This time Membership created the user, but ? was written to database instead of turkish characters in username.
I could not create usernames consisting local characters in DevArt Membership. Does DevArt Membership not accept local characters?
Unicode=true;
Turkish characters problem is solved and Membership creates the user names correctly. Thank you.
Now, there is a problem with characters I & I-dotted. Username with these characters is not found in your Membership functions. Our investigation shows that sql statements' parameters in your Membership conversions are correct. The problem comes from postgresql 9 x64 (with utf8 encoding and windows-1254 collation) database where lower function does not return correct characters.
Sarp Akal
Now, there is a problem with characters I & I-dotted. Username with these characters is not found in your Membership functions. Our investigation shows that sql statements' parameters in your Membership conversions are correct. The problem comes from postgresql 9 x64 (with utf8 encoding and windows-1254 collation) database where lower function does not return correct characters.
Sarp Akal
Re: Unicode=true;
Could you please confirm that the issue you have encountered is caused by PostgreSQL Server itself? If the problem is in our provider, please give us the following:sarp wrote:Now, there is a problem with characters I & I-dotted. Username with these characters is not found in your Membership functions. Our investigation shows that sql statements' parameters in your Membership conversions are correct. The problem comes from postgresql 9 x64 (with utf8 encoding and windows-1254 collation) database where lower function does not return correct characters.
1) a small test project to reproduce the issue in our environment (use the Membership.CreateUser() and Membership.ValidateUser() methods for simplicity);
2) Encoding.CodePage of your application;
3) the exact version of your PostgreSQL server;
4) the exact version of your current dotConnect for PostgreSQL.