Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
add a field and set label to chinseses,then on manage fields table list ,the name is incorrect.
is not field_(label name) but field_ .
attachment is a picture for this.
$field_name = preg_replace('/[^a-z0-9_]/', '', $field_name);
set field_name to use a-z0-9 only.
it is not a bug , so I set it as feature request.
it seems to important to me for theme the cck node type,it can make css more readable.
Yes, this is important to address, but I'm not sure how. We use the name string in several internal places where only ASCII is accepted. How should we make the conversion from non-Latin scripts to something reasonable in ASCII? I really dislike having a field for entering the name; in Latin scripts the automatic name generation is a great timesaver and allows us to avoid a lot of tedious instructions about what characters are valid.
I had delete two lines in content_admin.inc:
$form_values['type_name'] = preg_replace('/[^a-z0-9_]/', '', $form_values['type_name']);
$field_name = preg_replace('/[^a-z0-9_]/', '', $field_name);
then test the cck , all had worked now.
JonBob had said We use the name string in several internal places where only ASCII is accepted.
now i am doubt. as I know php and mysql now all support uft8, so where are only ASCII is accepted ?
is there something I wrong?
We'd need to verify that PHP, MySQL, and PostgreSQL support UTF-8 not just in strings, but in variable names, table names, column names... there might be more too, but at least those. And we have to check this for all versions we support.
all I know current php support UTF-8 variable name , function name ,as I often use function name ,variable name as chinese, and mysql can use fields name as chinese no problem .
I not use PostgreSQL currently . so anyone know about it?
I also had tested .css file which contain uft8 class name, it worked and pass W3C CSS check.
Comments
Comment #1
oscnet CreditAttribution: oscnet commentedcontent_admin.inc
$field_name = preg_replace('/[^a-z0-9_]/', '', $field_name);
set field_name to use a-z0-9 only.
it is not a bug , so I set it as feature request.
it seems to important to me for theme the cck node type,it can make css more readable.
Comment #2
JonBob CreditAttribution: JonBob commentedYes, this is important to address, but I'm not sure how. We use the name string in several internal places where only ASCII is accepted. How should we make the conversion from non-Latin scripts to something reasonable in ASCII? I really dislike having a field for entering the name; in Latin scripts the automatic name generation is a great timesaver and allows us to avoid a lot of tedious instructions about what characters are valid.
Comment #3
JonBob CreditAttribution: JonBob commentedComment #4
oscnet CreditAttribution: oscnet commentedI had delete two lines in content_admin.inc:
$form_values['type_name'] = preg_replace('/[^a-z0-9_]/', '', $form_values['type_name']);
$field_name = preg_replace('/[^a-z0-9_]/', '', $field_name);
then test the cck , all had worked now.
JonBob had said We use the name string in several internal places where only ASCII is accepted.
now i am doubt. as I know php and mysql now all support uft8, so where are only ASCII is accepted ?
is there something I wrong?
Comment #5
JonBob CreditAttribution: JonBob commentedWe'd need to verify that PHP, MySQL, and PostgreSQL support UTF-8 not just in strings, but in variable names, table names, column names... there might be more too, but at least those. And we have to check this for all versions we support.
Comment #6
oscnet CreditAttribution: oscnet commentedall I know current php support UTF-8 variable name , function name ,as I often use function name ,variable name as chinese, and mysql can use fields name as chinese no problem .
I not use PostgreSQL currently . so anyone know about it?
I also had tested .css file which contain uft8 class name, it worked and pass W3C CSS check.
Comment #7
KarenS CreditAttribution: KarenS commentedA very old issue that is taken care of in later versions by having the user explicitly set the machine name.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.