File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed 
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -3269,7 +3269,16 @@ private void appendDecoderDisplay(
32693269 }
32703270 else 
32713271 {
3272-  append (sb , indent , "builder.append('\\ '').append("  + varDataName  + "()).append('\\ '');" );
3272+  if  (characterEncoding .contains ("ASCII" ))
3273+  {
3274+  append (sb , indent , "builder.append('\\ '');" );
3275+  append (sb , indent , formatGetterName (varDataToken .name ()) + "(builder);" );
3276+  append (sb , indent , "builder.append('\\ '');" );
3277+  }
3278+  else 
3279+  {
3280+  append (sb , indent , "builder.append('\\ '').append("  + varDataName  + "()).append('\\ '');" );
3281+  }
32733282 }
32743283
32753284 lengthBeforeLastGeneratedSeparator  = sb .length ();
Original file line number Diff line number Diff line change @@ -158,6 +158,18 @@ public static String formatPropertyName(final String value)
158158 return  formattedValue ;
159159 }
160160
161+  /** 
162+  * Format a Getter name for generated code. 
163+  * <p> 
164+  * 
165+  * @param value to be formatted. 
166+  * @return the string formatted as a getter name. 
167+  */ 
168+  public  static  String  formatGetterName (final  String  value )
169+  {
170+  return  "get"  + Generators .toUpperFirstChar (value );
171+  }
172+ 
161173 /** 
162174 * Format a class name for the generated code. 
163175 * 
                         You can’t perform that action at this time. 
           
                  
0 commit comments