我正在使用JDev 11g。 我需要将文件上传到Webcenter Content。 我使用RIDC API上传文件,我可以成功上传。
问题是非英语字符被严重显示。
是否有任何设置将文件名编码设置为UTF8?
非常感谢提前!
更新:
文件名如下:Avucunuzdaki Kelebek Full-split- [Part-1]- _i .mp4 在Webcenter内容中。通常是Avucunuzdaki Kelebek Full-split- [Part-1]-üğşiçö.mp4
当我在我的integratedweblogicserver上本地运行应用程序时,我可以上传具有正确文件名的文件。但是在实时Webcenter Portal项目中,它会上传文件名如上所述的文件。
奇怪的是,如果组件上传了多个文件,就会发生这种情况。 在同一页面中还有一个af:inputFile组件,它成功上传了带有非英文字符的文件。
您可以在下面看到我用来上传的代码:
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;
}