Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/883#discussion_r76068439
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutSQL.java
 ---
    @@ -787,6 +802,29 @@ private void setParameter(final PreparedStatement 
stmt, final String attrName, f
                         stmt.setTimestamp(parameterIndex, new 
Timestamp(lTimestamp));
     
                         break;
    +                case Types.BINARY:
    +                case Types.VARBINARY:
    +                case Types.LONGVARBINARY:
    +                    byte[] bValue;
    +
    +                    switch(valueFormat){
    +                        case "":
    +                        case "ascii":
    --- End diff --
    
    How about cases for UTF-8 and UTF-16? Since the case just calls getBytes() 
with a charset name, we could support any/all of the ones in 
[StandardCharsets](https://docs.oracle.com/javase/8/docs/api/index.html?java/nio/charset/StandardCharsets.html).
 I found this while putting smileys in sql.args.N.value, the default handling 
will treat every byte as a 63.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to