What is the source or context? In some cases you can get encoding info from the source, other cases it is defined by documentation, other it could be assumed to be for example ASCII or your cultures Default, sometimes you just have to try to get the results you want.