I can confirm this. Your fix looks correct with how the code is setup right now. It would be nicer if we didn't have to convert from hub encoding -> UTF-8 -> hub encoding since the conversions can be lossly in some cases (e.g. if wrong hub encoding is chosen, user sends different encoding than hub, etc), but that would be a lot of work to implement. Forwarding to upstream.
I can confirm this. Your fix looks correct with how the code is setup right now. It would be nicer if we didn't have to convert from hub encoding -> UTF-8 -> hub encoding since the conversions can be lossly in some cases (e.g. if wrong hub encoding is chosen, user sends different encoding than hub, etc), but that would be a lot of work to implement. Forwarding to upstream.