Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with Persian Description attribute on enum field #12

Closed
hpourjam opened this issue Nov 23, 2014 · 5 comments
Closed

problem with Persian Description attribute on enum field #12

hpourjam opened this issue Nov 23, 2014 · 5 comments

Comments

@hpourjam
Copy link

Setting Persian Description attribute cause the table generated in database to have names like ??????.

@hpourjam hpourjam changed the title problem with Persian Description attribute on enum problem with Persian Description attribute on enum field Nov 24, 2014
@timabell
Copy link
Owner

Thanks for your bug report, I'm afraid I'm not that hot on i18n; but if anyone can provide a pull request that fixes this I'd be happy to integrate it. Character encodings is on my list of things to properly get the hang of, but I wouldn't hold out for a fix from me any time soon :-)

@hpourjam
Copy link
Author

I just figure out the problem, the problem was about collation, if target database does not support Persian language, characters of DescriptionAttribute contains Persian text will be converted to question mark "?", so I changed the collation of my target database and new exception comes up, "Cannot resolve the collation conflict between ....", I figure out that the problem is in PopulateLookup Method, it uses a temp table, this temp table is generated in tempdb in system databases, and because the collation of these two databases is different the problem raises, I fixed the issue by changing the name of temp table from "#lookup" to "string.Format("_TempEnum{0}", TableName(lookup.Name))", This change makes the temp table to be generated in the target database instead of tempdb and the problem resolved.

I don't know whether this is a good approach or not, but it solved my problem.

@timabell
Copy link
Owner

Looks like we can set the collation for the temp tables when they are created. http://stackoverflow.com/a/6073169/10245

@timabell
Copy link
Owner

Fixed in 8e0076d and released in v1.2.2, updated package now available via nuget. Let me know if that fixes it for you. Thanks for getting stuck in!

@hpourjam
Copy link
Author

yes it is fixed now, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants