Reputation: 172
I am using JDev 11g. I need to upload files to Webcenter Content. I use RIDC API to upload files and i can upload successfully.
The problem is that the characters which are non-english are being displayed corruptedly.
Is there any settings to set filename encoding as UTF8?
Many thanks in advance!
UPDATE:
File name looks like: Avucunuzdaki Kelebek Full-split-[Part-1]-�_i��.mp4 in Webcenter Content. Normally it is Avucunuzdaki Kelebek Full-split-[Part-1]-üğşiçö.mp4
When i run the application locally on my integratedweblogicserver i can upload files with correct filenames. But in live Webcenter Portal project it uploads files with corrupted file names like above.
And the weird part is it happens if components uploads multiple files. There is one more af:inputFile component in same page and it uploads files with non-english characters successfully.
You can see codes i use to upload below:
RIDCAdaptor ridc = new RIDCAdaptor();
DataBinder db =
ridc.checkinByUploadedPermanent(ufp, dosyaAdi, "DigitalMedia",
"Secure");
ridc.createFileLinkInFolder(ridc.getFolderGUID("/Portal/Portal_Yonetim/Portal_Sunumlar"),
db.getLocal("dDocName"), "owner");
public RIDCAdaptor() {
super();
idcClientManager = new IdcClientManager();
idcContext =
new IdcContext(ProjectUtils.getAdminusername(), ProjectUtils.getAdminpassw());
idcClient = createIdcClient();
}
public IdcClient createIdcClient() {
IdcClient idcClient = null;
try {
idcClient =
idcClientManager.createClient(ProjectUtils.getWCCIDCAddressWithPort());
} catch (IdcClientException e) {
e.printStackTrace();
}
idcClient.getConfig().setSocketTimeout(10000); // 30 secods
idcClient.getConfig().setConnectionSize(20); // 20 connections
return idcClient;
}
public DataBinder checkinByUploadedPermanent(UploadedFilePermanent uploadedFilePermanent,
String docTitle,
String docType,
String securityGroup) {
BlobDomain blobDomain = uploadedFilePermanent.getBlobDomain();
DataBinder dataBinder = idcClient.createBinder();
dataBinder.putLocal("IdcService", "CHECKIN_UNIVERSAL");
dataBinder.putLocal("dDocType", docType);
dataBinder.putLocal("dDocTitle", docTitle);
dataBinder.putLocal("dDocAuthor", idcContext.getUser());
dataBinder.putLocal("dDocAccount", "");
dataBinder.putLocal("dSecurityGroup", securityGroup);
dataBinder.putLocal("xClbraRoleList", ":authenticated(R)");
dataBinder.addFile("primaryFile",
new TransferFile(blobDomain.getInputStream(),
docTitle, blobDomain.getLength(),
uploadedFilePermanent.getUploadedFile().getContentType()));
ServiceResponse response = null;
try {
response = idcClient.sendRequest(idcContext, dataBinder);
} catch (IdcClientException e) {
e.printStackTrace();
}
DataBinder asBinder = null;
try {
asBinder = response.getResponseAsBinder();
} catch (IdcClientException e) {
e.printStackTrace();
}
return asBinder;
}
Upvotes: 0
Views: 170