I18NEncodingTestQuestions

Revision as of 18:24, 6 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Information needed to enable i18n testing related to encoding handling and use of and viewing of multibyte

Information provided by Ken Frank, Tools I18N quality and testing

Contact kfrank@netbeans.org for more information or with comments or questions about these pages.



These are the kind of questions we ask about encoding handling for modules in netbeans that helps let us plan our encoding and use of multibyte testing.

These are the kind of questions that might be asked.

For answers that are yes, we are assuming that means that the functionality being asked about has been designed and coded in, not just that it should work (we already assume it should)

For answers that are no, we need to know if it is something that will be implemented soon, unless its a java, spec or OS restriction.



NOTE - there is a new project encoding property and more enhanced handling of project and file encoding in netbeans 6.0. The overall name for these features is file encoding query (FEQ)

see nb api javadoc on these for more information at implementation level FileEncodingQuery FileEncodingQueryImplementation


These netbeans wiki faq documents tell more details about this


http://wiki.netbeans.org/wiki/view/FaqI18nProjectEncoding http://wiki.netbeans.org/wiki/view/FaqI18nChangeProjectEncodingImpact http://wiki.netbeans.org/wiki/view/FaqI18nFileEncodingQueryObject http://wiki.netbeans.org/DevFaqI18nFileEncodingQueryObject

These documents tell more about encoding handling and testing for it.
http://wiki.netbeans.org/I18NProjectFileEncoding

I18NEncodingGuidelines

I18NEncodingScenarios

I18NEncodingTestQuestions


The information in these docs and api might replace some details below if they refer to specific api, but the principles of encoding handling and how to test it are the same.



Information needed

Background

Encoding issues can arise in following types of situations
   * generating the file if its done by ide - using some user explicit or implicit input like from wizard responses
   * reading the data from some file in on restart of ide
   * reading the data in from file to ide properties, cache, etc while ide is running
   * saving data back to file
   * processing data obtained from other modules or outside the ide
   * processing data sent out to other modules or external processes
   * processing data input directly by user, like in a propery editor or input via UI.


Questions

*Topic - In context of the new for 6.0 FEQ for files and project encoding, see the docs mentioned and make sure, for testing that all projects and files follow it, both related to rules of project encoding property but also for other project and file handling related to encoding.

   * Question to ask is - has the FEQ been implemented for all project and file types ?


*Topic - use of multibyte in file names or file/data contents or values

         o question is - is it  legal to use non syntax/keyword english in file names, contents or other properties or data values, its legal to use multibyte the same -- are there any of the module's config and control or other program or application files where this would not be true ?
         o   is there anywhere in other properties, project names, locations, etc of these modules where use of multibyte would not be legal ?


* Topic - config and control files of the modules (like various xml ones)

   * Please list the names of these files including web app or j2ee/ejb/xml related ones; this could include deployment descriptor and other similar kind of files. (these are files created for user as result of user creating different project types by using wizards or other functionality, for example not talking here about application .java, .jsp, .html files - those are asked about in separate section.
   * for each of these files, is multibyte allowed in their name (user might explicitly name them or the name might be based on project name or other data seeded by some user input)
   * if there are some that don't allow this, will this be fixed for current release ? (assuming its legal in java and the specs for multibyte to be in their names.
   *  for each of these files, is multibyte allowed in properties or other data values in the file (assuming its legal per spec and that for some given data or property, english would be allowed as a value (vs some nunber or keyword)
   * be sure to check generated code also - if you set a property value in property editor to have multibyte, also check the generated java or other code
   *   If there are some values where multibyte now allowed, will that be fixed for current release ?
   *   for each of these files, assuming multibyte data might be in them, please note how the encoding is handled by them:

What is being looked for here is probably words like "utf8", "system locale (ie locale user is in)" or name of some other specific encoding.

* Topic - user application file types

         o For the file types that user creates or are created as part of projects of your modules, such as:
               +  java (default encoding is that of locale user is in)
               +  text (default encoding is that of locale user is in)
               +  jsp (default iso-8859-1 if not specified)
               +  html (default encoding is that of locale user is in)
               +  xml (default utf8 if nothing specified)
                     question -   Does the module use the default value of the encoding above of each of these file types for file creation ? (vs utf8)
                    question -    If user can change the encoding, do modules process that new encoding properly for:
        	 * writing to the file
  	 * reading file while in same session
         	*reading file into ide on restart 
   
        	 * writing data obtained from external processes/programs to file

(f or jsp, html, xml, encoding can be changed by tags in the file; for java files, there is an nb encoding property.)

* Topic - module data shown in UI or sent to other modules or external processes

         o Does this data, whether taken from a file or elsewhere, that could have multibyte as part of it, have the encoding handled so that the multibyte shows properly in the UI, like in wizards, menus, dialogs, property sheets or editors ?


*Topic - viewing of multibyte in UI - ie does the multibyte show properly (assuming that user has required fonts installed and locale set)

Assuming encoding is handled properly for files and data, both within module, between modules and between modules and external applciations or processes, as mentioned in above sections, the multibybe should display properly, assuming also the font naming in the code is handled properly. (and applies to view of multibyte after ide restart) symptoms of encoding not handled properly as to view of multibyte:

   * Symptoms of encoding not handled properly as to view of multibyte:
   * garbage ascii or other ascii control charcters
   * multibyte that does not look like it should (sometimes it may be not clear if what appears as multibyte is correct or not; and is one symptom of incorrect encoding handling.
   * nothing where text should be
   * question marks where text should be


To correct these problems, make sure encoding is handled properly - see other documents about encoding handling.

   * symptoms of hardcoding os font name and it not found:
                     * boxes where text should be

Thus the questions here relate just to fonts

               + Is there anywhere in code where a font name that is not a standard java logical font name is used ? If it is, java may not have mapping to it and it won't be found, even if on users system - so the characters won't show at all or won't show properly.
               +   Is there anywhere in code where font size is hardcoded ? Font sizes assignments should be relative to global ide font size, not hardcoded.
               +   if any third party libs or code is used in our modules, does it also not hardcode font names ?


*Topic - encoding of web page

               +  If module causes its own data to be shown on a web page (not as part of a user application), does it make sure correct encoding is used in jsp or other files so that multibyte data will show correctly in browser ?


*Topic - User directories

               +  Is there any data or file in user directory that is used to determine encoding or any messages/labels seen by user that would be localizable values ?

Assumption here is that user app files are in separate dir; in any case, not referring to these files for this question.

There should not be - messages/ labels should always come from bundle files in installed product in the case of messages or labels. As to encoding, it should be obtained from current locale or from some encoding property in config/control or user files of a given project if there is such a property or tag. (again assuming actual project dir is not in user dir for this question)

* Topic - encoding properties of a project

         o If there are encoding properties for a project itself, what are these ?
         o For projects where there is encoding and locale properties
 	  * is a change in encoding or locale properties reflected in encoding or charset values in jsp or other files that have these values seeded with default encoding or charset values ?
	   * if user changes these values in files, will it change it in properties ?
   * third party libs or code - all questions above apply to third party libs, especially those that might process files or data, or deal with encoding handling or display of data to user.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo