Tuesday, November 15, 2016

How to modify a user-defined list style in Microsoft Word 2016


  1. Click Format > Bullets and Numbering... > List Styles
  2. Select the style you want to modify and click Modify... . You can only modify user-defined styles.
  3. Update style
  4. Check Add to template. If you don't check this checkbox, your changes will only be applied to the current document else your changes will be applied to the template and will reflect not only to the current document but also to new documents.

How to create a new List Style template in Microsoft Word 2016

  1. Click Multilevel List icon in Home > Define New Multilevel List... or click Format > Bullets and Numbering... > List Styles > +
  2. If you want to change the default multilevel style, click the Format on the lower left part of the window and click Numbering...
    1. To create your own style, you cannot add a new one. You should click Customize.. to modify an existing style. The Reset button is initially disabled/grayed out if the style is not modified/customized (built in style) and becomes enabled after it is modified/customized. When Reset button is enabled, you may click it to reset back to the original built in style.
    2. Select a style
  3. If you want your style to appear under Multilevel List icon > List Styles, check Add to Template

Thursday, November 10, 2016

How to determine/specify encoding?

  • In Email - Content-Type: text/plain; charset="UTF-8"
  • In Client/Web page -  set encoding using the following (ordered from highest to lowest priority of browsers):
    1) charset parameter on HTTP Content-Type response header from server
    Content-Type: text/plain; charset=UTF-8
    2) charset on meta tag/element of HTML response
    <html>
    <head> <!-- meta tag must be the very first thing in the <head> section because when encountered by the browser it stops parsing the page and reinterpretes it  -->
    <!-- charset attribute was introduced on HTML5 and is more recommended to use -->
    <meta charset="UTF-8">
    <!-- use http-equiv attribute for HTML versions lower than HTML5 -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  • In Spring, to specify the encdoing to be usd in decoding form data - add filter for encoding
    <filter>  
        <filter-name>EncodingFilter</filter-name>  
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>  
        <init-param>  
           <param-name>encoding</param-name>  
           <param-value>UTF-8</param-value>  
        </init-param>  
        <init-param>  
           <param-name>forceEncoding</param-name>  
           <param-value>true</param-value>  
        </init-param>  
    </filter>

More on specifying encoding: http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps

Possible consequence of not specifying encoding: